displaying results

Results 1 to 2 of 2

Thread: displaying results

  1. #1
    Join Date
    Dec 1969

    Default displaying results

    i am running a sql query thast shows all the partners. i have a order by clause. so it shows gold first then platinum amd then silver. beacuse G comes before P and P comes before S.<BR><BR>Is there a way in sql or in asp so that i can show the Platinum first then gold and silver.

  2. #2
    Join Date
    Dec 1969

    Default What database?

    Please, when you ask questions about SQL, *ALWAYS* say what database!<BR><BR>Access:<BR><BR>ORDER BY IIF(color=&#039;P&#039;, 1, IIF( color=&#039;G&#039;, 2, 3 ) )<BR><BR>SQL Server:<BR><BR>ORDER BY CASE color <BR> WHEN &#039;P&#039; THEN 1<BR> WHEN &#039;G&#039; THEN 2<BR> ELSE 3<BR> END<BR><BR><BR>

Posting Permissions

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