Quantcast
Channel: Change SELECT DISTINCT to UPDATE DISTINCT - Database Administrators Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by undrline - Reinstate Monica for Change SELECT DISTINCT to UPDATE...

As much as I try to do it other ways, with fancy joins and whatnot, I typically come back to something that is easy to wrap my head around, and, whatsmore, can test a sample of (replace the UPDATE/SET...

View Article



Image may be NSFW.
Clik here to view.

Answer by Martin Smith for Change SELECT DISTINCT to UPDATE DISTINCT

To just update an arbitrary one from each distinct group you could useWITH T AS (SELECT ROW_NUMBER() OVER (PARTITION BY [Finance_Project_Number] ORDER BY (SELECT 0)) AS RN, [Processing_Result_Text],...

View Article

Change SELECT DISTINCT to UPDATE DISTINCT

How can I modify my SELECT DISTINCT query to an UPDATE DISTINCT query?It is important that it only updates the distinct records, as there are multiple records associated with each...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images