Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQLPlus ==> How do I rewrite this Query ?
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).
-- BillyReceived on Wed Jan 15 2003 - 03:24:31 CST