I have created adataset to make a drop down list for a parameter. As shown:
SELECT distinct [Table] FROM [Database]
The results i get back are A, B & C. What i am trying to do is show a result as a different word.
i.e instead of displaying A is shows in drop down list as Apple, B shows Banana. etc.
Can anyone help please.
Thanks
Lookup the usage of case(sql server). This should get you your desired result.|||The parameter can use two columns of the returned dataset, one for the value column and one for the display column, getting this back from the query and binding it to the appropiate properties in the parameter setting should help.HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de|||
Ok got it working.
select distinct
case [COLUMN NAME]
when 'A' then 'Apple'
when 'B' then 'Banana'
else 'Unknown'end
from [TABLE NAME]
where [COLUMN NAME] in ('A', 'B', 'C')