Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
BillEdd
Starting Member
12 Posts |
Posted - 2011-09-28 : 09:46:13
|
I need to add an item manually to the results of a select distinct statement. My statement is:select distinct Region from mytable order by RegionThis returns:EastNorthSouthWestI need to return:Select a regionEastNorthSouthWestThis is populating a drop down on a web site and I want "Select a region" as the first item before the regions appearTIABill |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-09-28 : 09:54:48
|
select ' Select a region' as Region union allselect distinct Region from mytable order by Region No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-09-28 : 09:56:14
|
Have a look: there is a space to get the ' Select a region' in top position... No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|