QUOTE(reCoded @ 30 Jun, 2009 - 07:01 AM)

I have a report and in my SQL query I have the following:
CODE
SELECT 'All' AS number FROM dual
UNION
SELECT DISTINCT number
FROM default_orders
ORDER BY number
Now in my SSRS report I preview my report and it runs my report fine. Only thing is that my drop down parameter list looks like this.
01
03
293
300
All
R#
RFE
My problem here is that I would like to have "All" be at the top of the list. I looked through everything and I am not sure if there is an option so when the report loads it will default to "All" instead of "01". I hope someone can help me out.
Thanks.
Hi recoded,
You must change your order statement to be something like checking to see if the value in the col number is a number:
CODE
select your_column from your_table
Union
select distinct your_column from your_table
order by
case when isnumeric(your_column) <> 1 then your_column else 999999999 end,
your_column
What this pusedo code will do is sort the varchars and put them at the top.
I hope this helps.