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: Help with a select statement

Re: Help with a select statement

From: Tony <andrewst_at_onetel.net.uk>
Date: 31 Mar 2003 03:16:06 -0800
Message-ID: <c0e3f26e.0303310316.7028e2db@posting.google.com>


l.ray_at_bigfoot.com (L.Ray) wrote in message news:<c198b469.0303302159.48f1d7dc_at_posting.google.com>...
> I need to do the following, but dont know how:
>
> select (select max(status) from tickets where location = 'NY'),
> (select max(status) from tickets where location = 'NJ')
> FROM tickets;
>
> If anyone could shine some light on how to do this, it would be appreciated.

You almost had it:

select (select max(status) from tickets where location = 'NY'),

       (select max(status) from tickets where location = 'NJ') FROM DUAL; -- not FROM tickets Received on Mon Mar 31 2003 - 05:16:06 CST

Original text of this message

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