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: Su Man <subu501_at_yahoo.com>
Date: Mon, 31 Mar 2003 12:48:06 +0530
Message-ID: <b68puv$7et$1@news.mch.sbs.de>


If my assumption is right, try this

SELECT location,max(status) FROM tickets WHERE location IN ('NY','NJ') GROUP BY location

(Not tested)

This will return two rows, one for each location.

"L.Ray" <l.ray_at_bigfoot.com> 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. Received on Mon Mar 31 2003 - 01:18:06 CST

Original text of this message

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