|
-
Jul 19th, 2006, 10:05 AM
#1
Thread Starter
Frenzied Member
Need help with a SQL statement
This SQL statement is in a VB prog, so thats why I am posting it here.
Nothing to do with the fact that most users commute here so I am more likely to get it answered quickly ... honest 
OK then ... I have a statement that grabs a load of records from a table.
One of the fields is known as "Risk Indicator" and is stored as either "R", "A" or "G", symbolising Red, Amber or Green.
I want to bring the recordset back in the order of (R)ed, (A)mber, and then (G)reen, which obviously leads to problems as a string sort in either ascending or descending format will not give me what I need.
My question is ... is there a way of transposing the "R", "A" and "G" values IN the select statement, so they could be something like "A", "B" and "C" ?
That way I would have my order as I need it.
I want to do it in the SQL statement if I possibly can, so I don't have to faff about afterwards, sorting my results etc.
Thanks.
Last edited by TheBionicOrange; Jul 19th, 2006 at 10:58 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|