i can't use a cursor cause its a dynamic query,
and i couldn't have a sql "if" statement within the "where" clause, to check if a value
was 0 or not

    something like:
        where 0=0
            if (@stateId<>0)
                and stateId=@stateId

----- Original Message -----
From: "Russ Conway" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 3:38 PM
Subject: RE: previous/next in sql


> > alright, i'm trying to create a "previous/next" statement so that
> > my query only grabs 6 records at a time.
>
> How about using a cursor and submitting the ID of the last record processed
> as a parameter to the stored procedure? Then just loop through the results
> until you hit the ID passed to the procedure and return the next 6 rows.
>
> Russell Conway
> HallofSports.com, Inc.
> 351 West 22nd Street
> New York, NY 10011
> P (646) 638-2500
> F (646) 638-3444
> http://www.hallofsports.com
> .. . . where the legends live on
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to