February 9, 2005 at 12:14 pm
The column prefix 'T2' does not match with a table name or alias name used in the query.
February 9, 2005 at 12:22 pm
update T1
set acctno = t2.accountno
from t2 join t1 on t1.custno = t2.custno
where (t2.office is null or t2.office='') and t1.office is null
Gordon Pollokoff
"Wile E. is my reality, Bugs Bunny is my goal" - Chuck Jones
February 9, 2005 at 12:25 pm
I think I could provide better help if I could see the whole query and some sample data... I'm pretty sure that my solution is incomplete but it might get you started.
Update T1 set T1.AcctNo = T2.AcctNo from T1 inner join T2 on T1.Custno = T2.Custno and ISNULL(T2.Office, '') = '' and T1.Office IS NULL
EDITED :
Damn got beat to the punch
February 9, 2005 at 1:04 pm
Thanks to both of you! We got this resolved.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply