Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Union query: Add a constant value to a recordset

Re: Union query: Add a constant value to a recordset

From: Chaihana Joe <ian_at_chezburns.com>
Date: Fri, 21 Dec 2007 02:38:22 -0800 (PST)
Message-ID: <29b78f90-38f2-4c0b-8964-d2a3936f29a4@i29g2000prf.googlegroups.com>


On 21 Dec, 10:25, Thomas Kellerer <YQDHXVLMU..._at_spammotel.com> wrote:
> Chaihana Joe, 21.12.2007 11:14:
>
> > Oracle noob here.
>
> > I need to add the value 'All' to a single column resultset. In MS SQL
> > Server I'd say
>
> > SELECT Sub_Asset_Class
> > FROM BIRT_Resp_Fin_Hierarchy_DIM
> > UNION SELECT ' All'
> > ORDER BY Sub_Asset_Class
>
> > What's the equivalent in Oracle SQL?
>
> SELECT Sub_Asset_Class
> FROM BIRT_Resp_Fin_Hierarchy_DIM
> UNION SELECT ' All' FROM DUAL
> ORDER BY 1
>
> Thomas

That worked a treat. Thanks Thomas. Received on Fri Dec 21 2007 - 04:38:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US