Viewing 15 posts - 1,711 through 1,725 (of 3,957 total)
Sean Lange (7/10/2013)
dwain.c (7/9/2013)
Sean Lange (7/9/2013)
I ran your query through a formatter to make it easier to read.You've got a SQL formatter? I'd like to hear about that!
Here is...
July 10, 2013 at 6:28 pm
GilaMonster (7/10/2013)
dwain.c (7/9/2013)
Thanks for the clarifications. I take it you're saying that even with a MAXDOP 1 on the simple SELECT it doesn't guarantee row ordering.
The only thing that...
July 10, 2013 at 2:03 am
Jeff's way is probably faster, but I have a general purpose function called RN_MULTINOMIAL that you can use for this.
See the 2nd article linked in my signature.
July 10, 2013 at 1:29 am
Delete through a CTE thusly:
WITH Rows2Delete AS (
SELECT id, [date], rn=ROW_NUMBER() OVER (PARTITION BY id ORDER BY [date] DESC)
FROM Verification)
DELETE FROM Rows2Delete
WHERE...
July 10, 2013 at 1:22 am
mickyT (7/9/2013)
... OVER (ORDER BY (SELECT 'I can''t think of anything better to put in here toocause this to be a string...
July 9, 2013 at 8:35 pm
Jeff Moden (7/9/2013)
DECLARE @BitBucket BIGINT
SET STATISTICS TIME,IO ON
SELECT TOP 1000000 @BitBucket=ROW_NUMBER() OVER (ORDER BY (SELECT NULL))
FROM sys.all_columns ac1, sys.all_columns ac2;
SELECT TOP 1000000 @BitBucket=ROW_NUMBER() OVER (ORDER BY (SELECT 0))
FROM sys.all_columns...
July 9, 2013 at 8:23 pm
mickyT (7/9/2013)
by the way I had a laugh over the $ controlling the order of things 😀
Yeah! Probably should have used the Euro symbol instead. 😛
July 9, 2013 at 8:21 pm
Thanks for the link Jeff. That is some pretty deep stuff.
July 9, 2013 at 8:00 pm
Sean Lange (7/9/2013)
I ran your query through a formatter to make it easier to read.
You've got a SQL formatter? I'd like to hear about that!
July 9, 2013 at 7:40 pm
As Alexander hinted at:
SELECT dt1=MAX(dt1), dt2, dt3, dt4, dt5
FROM #Something
GROUP BY dt2, dt3, dt4, dt5
July 9, 2013 at 7:34 pm
ccmret (7/9/2013)
July 9, 2013 at 7:11 pm
Jeff and Gila,
Thanks for the clarifications. I take it you're saying that even with a MAXDOP 1 on the simple SELECT it doesn't guarantee row ordering.
My question was mostly...
July 9, 2013 at 6:53 pm
reid.kell (7/9/2013)
July 9, 2013 at 6:46 pm
jralston88 (7/8/2013)
July 9, 2013 at 4:49 am
Or perhaps something like this:
WITH Regions (Region) AS (
SELECT 'north' UNION ALL SELECT 'south')
SELECT region=CASE Region WHEN 'north' THEN 2 WHEN 'south' THEN 3 END
FROM Regions
July 9, 2013 at 4:43 am
Viewing 15 posts - 1,711 through 1,725 (of 3,957 total)