Is there a way to insert/update a datetime value (getdate()
) into a temp table created like the following:
select id, null as testdate
into #temp_table
and then later statement:
update #temp_table
set testdate=getdate()
I get error:
cannot convert datetime into int...
Thanks.
Cast the column in the select into
select id, cast(null as datetime) as testdate
into #temp_table
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With