Viewing 15 posts - 1,261 through 1,275 (of 3,482 total)
Could you post some sample data - insert statements so we have something to work with? Basically, you can use LAG with a window to get the "previous" record, and...
July 10, 2018 at 3:11 am
Maybe this?SELECT member,
amt_paid,
amt_adjusted,
dt,
dupeNum
FROM
( SELECT member,
amt_paid,
amt_adjusted,
dt,
ROW_NUMBER() OVER (PARTITION BY member, dt, amt_adjusted ORDER BY member, dt) AS dupeNum
June 11, 2018 at 10:14 am
June 11, 2018 at 10:12 am
Kinda would help if I wrote an actual delete query... =)
Test the CTE out by doing SELECT from it first instead of DELETE;WITH
cteMembers(member, amt_paid,...
June 10, 2018 at 7:02 pm
June 10, 2018 at 5:09 pm
Like this? It's not super clear what you want. In this case, a sample expected result would be a big help. Something like this?Create table #t( member...
June 10, 2018 at 5:08 pm
Hi
I have below Data .