Subject RE: [IB-Architect] Re: SQL Expressions
Author David Schnepper
Last time I checked,

select <expression>
group by <expression>
order by <expression>

wasn't legal SQL by the ANSI/ISO definition. Even if the expression
is labeled with a column alias.

That said, it is an incredibily useful thing to have. And I'm not
surprised so many other databases have added it.

Dave



> -----Original Message-----
> From: jansdal@... [mailto:jansdal@...]
> Sent: Friday, March 02, 2001 2:49 AM
> To: IB-Architect@yahoogroups.com
> Subject: [IB-Architect] Re: SQL Expressions
>
>
> I've tried the following with different Databases:
>
> create table testtable ( col1 integer, col2 integer )
>
> insert into testtable ( col1, col2 ) values ( 1, 2 )
> insert into testtable ( col1, col2 ) values ( 3, 4 )
>
> select col1*10 as a, col2+5 as b, (col1*10)+(col2+5) as c from
> testtable order by c ,b,a
>
> InterBase 6 Not OK
> Oracle 8.1.5 OK
> MS Access Not OK
> SQL Server 7 OK
> SAP DB 7.2 OK
>
> Steen Jansdal
>
> --- In IB-Architect@y..., "Claudio Valderrama C."
> <cvalde@u...> wrote:
> > > -----Original Message-----
> > > From: Ian A. Newby [mailto:ian@w...]
> > > Sent: Jueves 1 de Marzo de 2001 7:18
> > >
> > > Hi All,
> > > In other SQL databases, the expression
> > >
> > > select col1 * 10 as a, col2 + 5 as b, a + b as c from mytable
> order
> > > by c, b, a
> > >
> > > is allowed.
> >
> > Ian, what other engines? Last time I tried in MsSql, it
> refused the
> > statement. Haven't tried with v2000, though.
> >
> > C.
>
>
>
>
> To unsubscribe from this group, send an email to:
> IB-Architect-unsubscribe@onelist.com
>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/





[Non-text portions of this message have been removed]