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-92 syntax question?

Re: SQL-92 syntax question?

From: Jarl <jarl_at_mimer.se>
Date: 1998/01/26
Message-ID: <jarl-2601980836080001@ymer.mimer.se>#1/1

> Is the following syntax valid in SQL-92 (Oracle allows it):
>
> SELECT a, exprFunc1(b), exprFunc2(c)
> FROM ...
> GROUP BY a, exprFunc1(b);
>
> exprFunc1() is say, a DayOfWeek() method returning the day of week of a
> given date.

No, its not a valid SQL 92 statement, since that standard specifies a query-specification as:

   SELECT [ALL | DISTINCT] select-list
   FROM table-reference [,table-reference]...

   [WHERE search-condition]
   [GROUP BY column-name [, column-name]...]
   [HAVING search-condition]


As you can see above, you can only list column names in the GROUP BY clause.

Regards,
Jarl

-- 
Jarl Hermansson                                  http://www.mimer.com
Product Development
Sysdeco Mimer AB
Received on Mon Jan 26 1998 - 00:00:00 CST

Original text of this message

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