alright, i'm trying to create a "previous/next" statement so that my query only grabs 
6 records at a time.

but first off, i have an order by statement that reads:

    order by 
datediff(dd,expirationDate,getdate())/abs(datediff(dd,expirationDate,getdate())),businessName

so i can't just grab where the id field is greater than the last one outputted.

then i tried creating it in a cursor in sql, but 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


i might be missing something, or maybe someone has a better idea, but what i'd really 
like to do (if it can be done)
is grab 6 records, and within sql, be able to specify the row number of the outputted 
query....so then i can put where (row number) > 6
for the next set of records.




Brandon Paolin
Programmer
AVERICOM Communications
856-874-1133 ext. 321
1931 Olney Avenue * Suite 600
Cherry Hill, NJ 08003
http://www.avericom.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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