Hi,
How can I write this?
I have 2 tables, table A and table B. Each table has a datetime field. What I need to do is update just the YEAR portion of table A's datetime with the YEAR from table B's datetime.
So far I have this:
begin tran
update customers c
set renewaldate = CAST( select year(tc.renewaldate) from _temp_customers tc ... ??) AS DATETIME
rollback
Any ideas??
Thanks
How can I write this?
I have 2 tables, table A and table B. Each table has a datetime field. What I need to do is update just the YEAR portion of table A's datetime with the YEAR from table B's datetime.
So far I have this:
begin tran
update customers c
set renewaldate = CAST( select year(tc.renewaldate) from _temp_customers tc ... ??) AS DATETIME
rollback
Any ideas??
Thanks