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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL query: how can I hide a column in output?

Re: SQL query: how can I hide a column in output?

From: Jaap W. van Dijk <j.w.vandijk.removethis_at_hetnet.nl>
Date: Mon, 28 Aug 2006 19:14:18 GMT
Message-ID: <44f33eb7.3669015@news.hetnet.nl>


On Mon, 28 Aug 2006 18:28:37 GMT, j.w.vandijk.removethis_at_hetnet.nl (Jaap W. van Dijk) wrote:

>On 17 Aug 2006 11:52:28 -0700, "Ray Saltrelli" <reymundo514_at_gmail.com>
>wrote:
>
>>Sometimes you may need to have a column in the SELECT clause in order
>>to group by that column, for example, but you may not want to actually
>>display it. Try this:
>>
>>SELECT a, b, FROM (SELECT a, b, c FROM Table1 GROUP BY c );
>>
>You don't need to specify the column you want to group by in the
>select list, so
>
>SELECT a, b FROM Table1 GROUP BY c
>
>Is legal syntax.
>
>Jaap.

Oops, I was led astray be your description not describing the code example. Your syntax is not legal, unless you meant a and b to represent an aggregate function.

What I meant was:

SELECT a, b FROM Table1 GROUP BY a,b,c

is legal syntax.

Jaap. Received on Mon Aug 28 2006 - 14:14:18 CDT

Original text of this message

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