Viewing 15 posts - 47,986 through 48,000 (of 59,064 total)
This will work... without TOP or a correlated subquery to use it...
;WITH
cteRandom AS
(SELECT ROW_NUMBER() OVER (PARTITION BY Gid ORDER BY NEWID()) AS RandRow,
...
September 30, 2008 at 10:54 pm
bhuvnesh.dogra (9/30/2008)
Is it possible to use TOP in this query ....i want to use TOP
Why?
September 30, 2008 at 10:38 pm
Here's the corrected test code and a solution... Now, I'm curious... why don't you care which RecID you return, please?
create table mytest
(
Recid int ,
Gid varchar(2) )
GO
------------------------------------------------
insert into mytest(RecID,Gid) select...
September 30, 2008 at 10:29 pm
The test code produces errors.
The way to do this is to use MIN and GROUP BY.
September 30, 2008 at 10:26 pm
It would really be helpful if, in the future, you would pose such questions with a properly formed create table statement and some ready to use data. Please see...
September 30, 2008 at 10:22 pm
Vincent Central (9/30/2008)
September 30, 2008 at 9:27 pm
mixalissen (9/30/2008)
UPDATE t
SET var1 = var2
FROM someTable,(
...
September 30, 2008 at 9:24 pm
Heh... I find it very difficult to believe an article on performance where the author says "At first, we prepare a test table with 1 million records:" and then builds...
September 30, 2008 at 9:21 pm
John, the article that Richard was referring to (thank you for the kudo, Richard) is located at the following URL...
[font="Arial Black"]The "Numbers" or "Tally" Table: What it is and how...
September 30, 2008 at 9:07 pm
Well done, Richard! 🙂
Just a suggestion... you may be able to get a wee bit more speed out of it if you eliminate as many of the math functions as...
September 30, 2008 at 9:04 pm
If it's gotta be... correctly update "sequence" table would probably fit the bill here.
September 30, 2008 at 8:39 pm
See the "performance" section of the following article...
September 30, 2008 at 8:26 pm
No... you have the conversion on one of the columns in the Insert list... it has to be on the Date column in the Values list, instead.
September 30, 2008 at 8:19 pm
rmechaber (9/30/2008)
Corollary: kick the trash barrel before sticking your hand in!
We used to have a saying in the Navy... buy lunch... leave the trash barrels alone. 😛
Anyway, thanks for the...
September 30, 2008 at 7:57 pm
Dave (9/25/2008)
Wait for it...🙂
Heh... too easy... not even going to bother. 😛 I just shake my head and wonder. :Whistling:
September 30, 2008 at 7:53 pm
Viewing 15 posts - 47,986 through 48,000 (of 59,064 total)