Hi I need help with the syntax on this code:
IF OBJECT_ID('TEMPDB..#LTS_MAP') IS NOT NULL
BEGIN DROP TABLE #LTS_MAP END
SELECT
dtMicIssue as LATE_CHARGE_FACTOR
,CASE
WHEN (dtMicIssue is NOT NULL) AND (dtMicIssue <> '1900-01-01 00:00:00')
THEN CONVERT(SMALLDATETIME,dtMicIssue)
ELSE NULL END
INTO #LTS_MAP
FROM SBAURSQL001.LTSArchive.dbo.LoanMaster_0609
receiving error: Msg 8155, Level 16, State 1, Line 5 No column was specified for column 2 of '#LTS_MAP'.
Trying to combine case functionality with select of the dtMicIssue and messing up on the syntax...