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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Stupid SQL question

Re: Stupid SQL question

From: Erika Grondzakova <grondzak_at_fria.utc.skx>
Date: Fri, 29 May 1998 09:17:25 +0200
Message-ID: <356E6105.470C@fria.utc.skx>


Hi,

select city || '-NE' from blah where city = 'OMAHA' and state = 'NEBRASKA'
UNION
select city || '-IA' from blah where city = 'OMAHA' and state = 'IOWA';

						Erika
 						grondzak_at_fria.utc.sk


Marcy A. McKee wrote:
>
> Hello,
> I have the following query:
> select city || '-NE' from blah where city = 'OMAHA' and state =
> 'NEBRASKA'
> that works the way I want it to. My problem is that I want to include an
> additional statement like
> select city || '-IA' from blah where city = 'OMAHA' and state = 'IOWA'
> so that my end result is OMAHA-NE when the state is equal to Nebraska
> and OMAHA-IA when the state is equal to Iowa. Any ideas on how to do
> this?
>
> Thanks,
> Marcy
Received on Fri May 29 1998 - 02:17:25 CDT

Original text of this message

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