Below is the example of update statement with self subquery in SQL. UPDATE TB1 A SET A.IND = 'N', A.ENDDT = (Select Max(C.enqDT) -1 from TB1 C where A.Bus_KEY = C.BusKEY and C.IND ='Y' group by C.BusKEY) Where A.IND = 'Y' and A.EFFDT < (Select max(enqDT) From TB1 B Where B.col1 = A.col1 and B.bus_KEY = A.busKEY and B.IND = 'Y');
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.