Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Join statement
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Miscellaneous
Thread ID:
01265876
Message ID:
01266019
Views:
10
Thank you...one small change and I got what I needed.

Thanks again for your help.
Daniel
update a
set a.nchange = 1
from bdgt_m a
     join (SELECT DISTINCT bdgt_m_deleted.cacctid, bud_new, bdgt_m_deleted.ddeleted
                  FROM bdgt_m_deleted
                  INNER JOIN (SELECT cacctid, MAX(ddeleted) AS ddeleted
                                     FROM bdgt_m_deleted GROUP BY cacctid) Tbl1
           ON  bdgt_m_deleted.ddeleted = Tbl1.ddeleted) B
on a.cacctid = b.cacctid
where a.bud_new <> b.bud_new
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform