Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

query

$
0
0

How to update the status to 'Active' when the condition is :

max(audit_date) and max(audit_sequence) then update status to 'Active' for all different product.

There are many product whose max(audit_date) is different as well as max(audit_sequence).

PFA.

Productaudit_dateaudit_typeaudit_sequencestatus
8090052013-06-043883469InActive
8090052013-06-044883470Active
7255052013-10-294919036InActive
7255052013-11-163921387InActive
7255052013-11-164921388Active



Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>