tbaseflug
asked on
Prepend Value to Select
I have a select that I am taking into a stored procedure - which will tehn be bound to a dropdownlist in my html/asp page - what I want to do is to add a "SELECT ALL" value to the single select statement -
SELECT DISTINCT LEFT(Sub, 3) AS SiteID --, CustID
FROM SIVApplication.dbo.ARTran
Produces:
000
123
456
What I want is:
Select All
000
123
456
SELECT DISTINCT LEFT(Sub, 3) AS SiteID --, CustID
FROM SIVApplication.dbo.ARTran
Produces:
000
123
456
What I want is:
Select All
000
123
456
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That works - how would I order by to make certain that the SELECT ALL came first and everythign else was ordered by the other value (SiteID)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
UNION ALL
SELECT DISTINCT LEFT(Sub, 3)
FROM SIVApplication.dbo.ARTran