Viewing 15 posts - 1,261 through 1,275 (of 3,489 total)
Post the Oracle query then. Then modify if that doesn't work. There is a fair amount of overlap between Oracle and SQL Server dialects of SQL. Try it and if...
July 20, 2018 at 7:04 pm
This is homework. Give it a try and then tell us what you're having trouble with.
July 20, 2018 at 4:46 pm
What happens if you use the 64-bit version? The problem with a 32-bit application is that it can only address about 3.5 GB or memory.
July 20, 2018 at 2:52 pm
For someone who's been around as long as you have, you should know that's not a table. If people can't recreate your scenario, you're not likely to get an answer. ...
July 20, 2018 at 9:44 am
What do you mean by "nearest to today"? Can be either before or after? Then you'd have to do MIN of ABS(DATEDIFF....) or return the top 1 value...
July 18, 2018 at 8:25 pm
You shouldn't be grouping by EventDate - you're trying to return a MIN([EventDate]), so grouping by it (return each unique value) doesn't make sense.
July 18, 2018 at 4:42 pm
If you have control over the design of the table, you could create a new column and extract just that part to the new column. Then you could index it...
July 11, 2018 at 3:03 pm
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