How to cleanup my parameter list that contains two column of data
Hello,
I have wrote a query that I am using for my SSRS parameter. It contains something like:
abcd this is a test1
abc this is a test2
abcde this is a test3
as you can see as first item gets smaller or larger it looks kind of messy. Is there a function that I can use to fix this?
thanks
March 10th, 2011 11:39pm
Hello,
Then use the order by clause in your query like.
SELECT
Field1,
Field2
FROM
YourTable
ORDER
BY Field1
Olaf Helper
* cogito ergo sum * errare humanum est * quote erat demonstrandum *
Wenn ich denke, ist das ein Fehler und das beweise ich tglich
Blog
Xing
Free Windows Admin Tool Kit Click here and download it now
March 12th, 2011 6:00am
Hi,
In your T-SQL query please use order by clause either on field1 or field2 based on the requirement.
Please mark as answer if this post helps....
Thanks,
Shobhit
March 12th, 2011 8:16am
Thank you both for your input but I think I did not clearly stated my issue. The issue is not the order by at all. I am using select and order by to get the data from a table and am using it for my parameter dropDown list
box like
Select code, " " + description
From myTable
Order by code;
Say the column code is varchar(8) but data length is vary, from 3 to 8. When I use the select above, the data inside the dropDown list box going to look "crooked". Then dropDown list box looks something like: (an Example) I like to make it formated
that the second column always start from a fixed position.
Acacia Keisha is considered a
short form of this name. [14]
Addie Short form of Adelaide, Adeline, or Addison. [1]
Alex Short form of Alexandra and Alexis ... [1]
Alita Spanish short form of Adelita.
Alla Also a short form for Al- names. [3]
Aloma Short form of Paloma.
Alta Short form of Altagracia ... [2]
Amantha Also a
short form of Samantha.
Asia Also sometimes used as a
short form of a name ending with -ia ... [7]
Asta Also a short form of Anastasia, Astrid, Augusta, etc ... [11]
Avis derived from a
short form of names with "av" ... [2]
Thanks again
Free Windows Admin Tool Kit Click here and download it now
March 13th, 2011 7:46am