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: SQLPlus ==> How do I rewrite this Query ?

Re: SQLPlus ==> How do I rewrite this Query ?

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Wed, 15 Jan 2003 11:24:31 +0200
Message-ID: <b032bo$qnn$2@ctb-nnrp2.saix.net>


LT Cheah wrote:

> SELECT EVAL, HD13
> FROM MY_TABLE
> GROUP BY EVAL, HD13

<snipped>
>
> Question:-
> How can the query be rewritten to list out
> only rows 1,2,4,5 ie rows with both QDOS and AII for any single HD13
> (note only possible values for EVAL is either QDOS or AII)

Not exactly sure what you're after... but think WHERE clause to limit the INPUT to the query and its grouping and think HAVING clause to limite the OUTPUT of the query (e.g. HAVING count(*)=1 will only return data where there's a single EVAL and HD13 combo).

--
Billy
Received on Wed Jan 15 2003 - 03:24:31 CST

Original text of this message

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