I have been trying to update the value of a column in table A, using the Min value of a column from table B, and have been unable to figure it out.
This is the query I need to use to update the value in Table A
Select COL1, COL2, MIN(UPD_DT)
From Table B
Group By COL1, COL2;
The B.MIN(UPD_DT) needs to used to update A.UPD_DT
where A.COL1 = B.COL1 and A.COL2 = B.COL2.
I've tried many different variations for this query, but just can't find any way that actually works.
Any suggestions would be greatly appreciated.
This is the query I need to use to update the value in Table A
Select COL1, COL2, MIN(UPD_DT)
From Table B
Group By COL1, COL2;
The B.MIN(UPD_DT) needs to used to update A.UPD_DT
where A.COL1 = B.COL1 and A.COL2 = B.COL2.
I've tried many different variations for this query, but just can't find any way that actually works.
Any suggestions would be greatly appreciated.