October 10, 2005 at 10:25 am
update table empower.U_wire_info (fedref, FedRefDateTime)
set fedref = [Fed Ref Number]
set fedrefdatetime = datesent
select [Fed Ref Number],([date sent] + [time sent]) as 'DateSent' from ncenfedrefs
where empower.u_wire_info.lnkey = ncenfedrefs.[loan id]
need to update fedref and fedrefdatetime from ncenfedref table but the for date and time it has saperate filed and need to combine to one and update the table.
how can i do that
Thanks
October 10, 2005 at 10:48 am
that is an update from clause
some thing like this
this will update every row in empower. Do you have more criteria to limit the # of rows to update?
update A
set fedref = [Fed Ref Number]
set fedrefdatetime = convert(datetime,'[date sent]' + ' ' + [time sent])
from empower.U_wire_info A
join ncenfedrefs on empower.u_wire_info.lnkey = ncenfedrefs.[loan id]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_md_04_5ixx.asp
October 11, 2005 at 6:51 am
just need to update where loanid in fedref table to u_wire_info. from ncenfedref table. but it gives error at set fedrefdatetime?
Please Let me know.
Thanks
October 11, 2005 at 8:38 am
Try...
update A
set fedref = [Fed Ref Number],
fedrefdatetime = convert(datetime,'[date sent]' + ' ' + [time sent])
from empower.U_wire_info A
join ncenfedrefs on empower.u_wire_info.lnkey = ncenfedrefs.[loan id]
Jason Strate
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply