I have been searching the forum but cant find any help.
I have a data table DT1 that contains approx 20 columns. I would like to do a group by, insert the result in a new data table DT2 and do a left join between DT1 and DT2. How can I accomplish this?
Order ID, Serial No, Amount, Column x, Column z etc
Select Order ID, Serial No, Sum(Amount) as Total
Group by Order ID, Serial No
Select * from DT1
left join DT2 on DT1.Order ID = DT2.Order ID and DT1.Serial No=DT2.Serial No