SQL2000 question

Results 1 to 2 of 2

Thread: SQL2000 question

  1. #1
    Join Date
    Dec 1969

    Default SQL2000 question

    Scenario -<BR>I do a search for a product, let’s say it returns 10 items. I then click on the 5th item and it takes me to the details for that item. On the details page there is a link for the next item. I click on that and it should bring me to the 6th item returned from the search. Click again 7th, etc. after the 10th the 1st item would be returned and the cycle starts again.<BR><BR>I have this working using vbs but I think it is much slower than it should be. I’m wondering if this can be done in SQL 2000. I was playing around with FETCH but do not totally understand the process. Looking for a SQL solution where it returns the next sku only, if possible. <BR><BR>Working sample.<BR>http://www.kahunaprints.com/search.asp?cP=5&catid=A&imgPage=6&search=&aid=3&or ientation=A<BR><BR>SELECT * FROM [products] WHERE active = ‘Y’ AND aid = 3 ORDER BY sku<BR><BR>Any help on getting this to work would be great.<BR><BR>jc<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL2000 question

    on the details page you can number the items then when you you pass that item number and the max(itemnumber) = number of records returned<BR><BR>the link is created dynamically <BR><BR>if itemnumber = maxitemnumber then<BR> itemnumber = 1<BR>else<BR> itemnumer = itemnumber +1<BR>end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts