| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
|||
Updating 2 rows with just 1 row of data?In 1 table I have duplicate rows which I can select via a query so I know which ones are the duplicates.
However i have now merged these 2 rows into 1 via another query SELECT TOrder_NO, TPart_NO, SUM(TOrder_Qty) AS Expr1 FROM dbo.tblTransitCiPe GROUP BY TOrder_NO, TPart_NO HAVING (COUNT(*) > 1) But now I want to be able to insert/update the results of the above query into my orginal table so that where there are 2 rows on the same data these 2 rows will be deleted and replaced with the 1 row from the query above. cheers for any help |
|
Be the first to answer this question! Click on the 'Post Reply' button below.
|