Viewing 15 posts - 7,021 through 7,035 (of 7,636 total)
Transactions CAN wrap multiple SQL batches and GO commands.
May 1, 2008 at 12:10 am
RyanRandall (4/30/2008)
rbarryyoung (4/30/2008)
...Is this aimed at my suggestion?
Oberion's, I think.
April 30, 2008 at 11:43 pm
Jeff Moden (4/30/2008)
I'm curious... Why 4 months? That's a third of a year...
That's probabrly why, Jeff. I did some work for an insurance company several years ago and...
April 30, 2008 at 11:41 pm
That example can't really be used here Jeff because it assumes the existence of a useable RowNum column and that just doesn't exist in the general Web Page/Rows case. ...
April 30, 2008 at 11:25 pm
Jeff Moden (4/30/2008)
Simple... Just like I said in the too short write up... I prefer the word "Tally" to "Number" 😀
The only problem is, there already is something called a...
April 30, 2008 at 10:54 pm
Just add an "ORDER BY Student, AttendDate" to the end of Jason's (Joel's?) query.
April 30, 2008 at 10:44 pm
Oops, wait a minute, I am getting my threads mixed up... Never mind.
April 30, 2008 at 10:24 pm
Actually, Jeff, it's not that different from what I am already doing, except that it is dependent on an Index that may not exist.
April 30, 2008 at 10:20 pm
The query that I posted above has been doing pretty well. I'm testing it on a 3-million row table with substantial column width (sysobjects plus about 200 more bytes)...
April 30, 2008 at 8:51 pm
My random and ad-hoc tests leads me to believe that this is about as good as you can do
Create Proc spTableRows_Window(@startingRow int, @rows int)
AS
--NOTE: some stuff stolen from Jeff...
April 30, 2008 at 7:01 pm
Jason Selburg (4/30/2008)
Sorry RBarry, but this is the SQL 2000 forum. ROW_NUMBER() isn't supported in 2000.
Rats! I forgot to check, sorry.
April 30, 2008 at 6:10 pm
OK, no answers yet, but this is what I have come up with:
--====== Load up the working table
SELECT b.Record_No
, b.Item
, b.PlnQty
, Rank()...
April 30, 2008 at 6:08 pm
Also, this bit here:
...
SELECT @@fetch_status
WHILE @@fetch_status = 0
BEGIN
IF @ChkItem <> @CumItem
BEGIN
Set @ChkItem = @CumItem
Set @mCid =...
April 30, 2008 at 4:58 pm
Please put your data into a form that we can use for tests (like INSERT statements). Here is a link that explains this:http://www.sqlservercentral.com/articles/Best+Practices/61537/
April 30, 2008 at 4:35 pm
Something like this:
Select *, row_number() Over(Partition by StudentID Order by EntryDate)
From Students
April 30, 2008 at 4:22 pm
Viewing 15 posts - 7,021 through 7,035 (of 7,636 total)