Hi All, I have this tableCol1 Col2 date col5 TechDET 12 12/23/2009 0 12345NDET 12 12/23/2009 1 DET 12 12/23/2009 2 PQR 13 12/15/2009 0 6987PPQR 13 12/15/2009 1 PQR 13 12/15/2009 2 PQR 13 12/15/2009 3
I want to update Tech column with the same value that it has with the first row as long as the col1 row = col2 row and dates are also equalso I want the result like thisCol1 Col2 date col5 TechDET 12 12/23/2009 0 12345NDET 12 12/23/2009 1 12345NDET 12 12/23/2009 2 12345NPQR 13 12/15/2009 0 6987PPQR 13 12/15/2009 1 6987PPQR 13 12/15/2009 2 6987PPQR 13 12/15/2009 3 6987P
i tried to do this with self join, but it didn't work. below is what i tried to doUpdate aset tech= B.techfrom table1 a INNEr JOIN table1 bON a.col1 =b.col1and a.col2 =b.col2and a.date =b.dateThe aboe query didn't work.