Steve,

>From my standpoint I have always simply used the order by clause and tra
cked
the max and min of whatever values I am using for ORder by - if someone h
as
a better way (short of a stored proce with a cursor and fetch next) I'd l
ove
to get in on it.

Mark

-----Original Message-----
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 8:38 PM
To: CF-Talk
Subject: RE: MSSQL and LIMIT


I thought that this question would of come up at least once in the past,
I guess no one has figured out a way to get rows by rowID or LIMIT with
MSSQL.

Every answer I've seen so far is different, is there a recommended way
to do it?  I'm sure someone out there has needed to get row 20,000
through 20,100 in MSSQL without getting the entire table in a cfquery.

______________________
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-----Original Message-----
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 11:22 PM
To: CF-Talk
Subject: RE: MSSQL and LIMIT


Make the cursor insert into a temp database then pull the data from the
temp database.



-----Original Message-----
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 6:32 PM
To: CF-Talk
Subject: RE: MSSQL and LIMIT

I've tried it with a cursor and a stored proc, but that returns 50
recordsets, not 50 rows in one recordset.

I'm guessing that there is no RowID() in MSSQL?

______________________
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-----Original Message-----
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 7:48 PM
To: CF-Talk
Subject: RE: MSSQL and LIMIT


Well that's pretty cool - I've not seen that syntax. You could do this
wi
th
a Cursor and a stored proc of course.

-----Original Message-----
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 2:37 PM
To: CF-Talk
Subject: RE: MSSQL and LIMIT


Hmmm, that could work, but that's pretty sloppy when dups come to play,
I'm guessing that no one knows of a way to do it by row number?

In mysql I just put:
SELECT *
FROM table
LIMIT 2000, 2050

Why doesn't cfquery have a startrow attribute?


______________________
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-----Original Message-----
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 7:25 PM
To: CF-Talk
Subject: RE: MSSQL and LIMIT


Ok - then you need to track the name and the where clause becomes

        WHERE  NAME > '#myStoredName#'

 this is a bit trickier because you could have duplicate names.  So you
might have to futz with your WHERE clause a bit (adding an OR condition
etc.)






______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to