Home » SQL & PL/SQL » SQL & PL/SQL » Adding dummy value to list of selected values
Adding dummy value to list of selected values [message #193061] Thu, 14 September 2006 13:29 Go to next message
welchaz
Messages: 23
Registered: April 2005
Location: Tucson, AZ
Junior Member
I want to populate the values in a drop-down list through this query, except that I want one additional value to appear: "ALL". Can I add in this dummy value to the select statement somehow?

Here's the simple query and results:

select ID_STOREROOM From storeroom_tbl where fg_active='Y';

ID_STOREROOM
CENTRAL
SC
ENOGALES


I would like results to be:
ID_STOREROOM
ALL
CENTRAL
SC
ENOGALES

Thanks in advance.

Re: Adding dummy value to list of selected values [message #193062 is a reply to message #193061] Thu, 14 September 2006 13:39 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
select ID_STOREROOM
  From storeroom_tbl 
 where fg_active='Y'
union all
select 'ALL'
  from dual;
Re: Adding dummy value to list of selected values [message #193064 is a reply to message #193061] Thu, 14 September 2006 13:46 Go to previous message
welchaz
Messages: 23
Registered: April 2005
Location: Tucson, AZ
Junior Member
Perfect! I knew it was something simple. Thanks very much!
Previous Topic: Column Heading in The Output
Next Topic: Cursor Problem
Goto Forum:
  


Current Time: Mon Dec 02 08:45:17 CST 2024