Hello,
I would like to add a column to a select statement that is smalldatetime but I want it initialized it to null.
as NEW_SDT would not be a smalldatetime this does not work.
I can create the table before the select but would rather know if there is a way to create the column on the fly.
Thank you,
djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!
I would like to add a column to a select statement that is smalldatetime but I want it initialized it to null.
Code:
SELECT DISTINCT myCol1, myCol2, NULL AS NEW_SDT
INTO #Temp
FROM mytable
I can create the table before the select but would rather know if there is a way to create the column on the fly.
Thank you,
djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!