I did this by changing to:
sql = "SELECT * FROM quest WHERE questID = '" & questID & "' AND questnumber
IN (" & questreq & ")"
That works, although now if questreg = 2,8,4,6 the questions come up in
ascending numerical order....
How do I change this so it comes up in the order I requested?
Many thanks
Alex
NOTE: The information contained in this email is intended for the named
recipients only, it may be privileged and confidential. If you are not the
intended recipient, you must not copy distribute or take any action in
reliance upon it. No warranties or assurances are made in relation to the
safety and content of this email and any attachments. No liability is
accepted for any consequences arising from it.
_____
From: Alex [mailto:[EMAIL PROTECTED]
Sent: 30 October 2004 09:05
To: [EMAIL PROTECTED]
Subject: [ASP] SQL statement and result ordering....
I have the SQL statement:
sql = "SELECT * FROM quest WHERE questID = '" & questID & "' ORDER BY
questnumber ('3,5,9')"
In the database, there are several sets of questions (hence the questID
field), but then I want to just to be able to pick out a selected number (in
this case 3, 5 and 9)
The statement and page works with:
sql = "SELECT * FROM quest WHERE questID = '" & questID & "' ORDER BY
questnumber ASC"
What do I need to do to make it work with a specific set of question
numbers?
Many thanks
NOTE: The information contained in this email is intended for the named
recipients only, it may be privileged and confidential. If you are not the
intended recipient, you must not copy distribute or take any action in
reliance upon it. No warranties or assurances are made in relation to the
safety and content of this email and any attachments. No liability is
accepted for any consequences arising from it.
[Non-text portions of this message have been removed]
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://us.ard.yahoo.com/SIG=1298rebpk/M=315388.5543473.6613715.3001176/D=gr
oups/S=1705115381:HM/EXP=1099219633/A=2372354/R=0/SIG=12id813k2/*https://www
.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS> click
here
<http://us.adserver.yahoo.com/l?M=315388.5543473.6613715.3001176/D=groups/S=
:HM/A=2372354/rand=772777600>
_____
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/