Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert to the frist row 1

Status
Not open for further replies.

xxing

Programmer
Feb 17, 2004
61
NZ
Hi I have a table that has the following data:

Column1
Apple
Banana
Orange
Pear

Column1 is in alphabetical order

I would like the following:

Column1
Select All
Apple
Banana
Orange
Pear

Thank you
Mark
 
I'd opt to put the logic in the application, however if you are unable to do so, then the following will work. Note the space prefix before "Select All" to aid in the ORDER BY clause.


SELECT ' SELECT ALL' AS Column1
UNION ALL
SELECT Column1 FROM YourTable
ORDER BY Column1
 
Thank you Riverguy for the post. A star for you!!

Regards
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top