Subject | RE: [IB-Architect] Re: SQL Expressions |
---|---|
Author | Bill King |
Post date | 2001-03-09T07:44:17Z |
i've got a question about the validity of
select <expression> as alias, <expression containing alias> as alias
and what's the hope of supporting that sort of functionality?
(think spreadsheet like computations).
select costprice, saleprice, saleprice+(saleprice*0.1) as tagprice,
tagprice-overhead-costprice as profit
from sometable
(for example)
--
Ungod (W.King)
Buy my soul by using this link. Click here:
http://www.soulXchange.com/soulStats.asp?id=8529
select <expression> as alias, <expression containing alias> as alias
and what's the hope of supporting that sort of functionality?
(think spreadsheet like computations).
select costprice, saleprice, saleprice+(saleprice*0.1) as tagprice,
tagprice-overhead-costprice as profit
from sometable
(for example)
--
Ungod (W.King)
Buy my soul by using this link. Click here:
http://www.soulXchange.com/soulStats.asp?id=8529
> -----Original Message-----
> From: dianeb77@... [mailto:dianeb77@...]
> Sent: Monday, 5 March 2001 1:39 PM
> To: IB-Architect@yahoogroups.com
> Subject: [IB-Architect] Re: SQL Expressions
>
>
> --- In IB-Architect@y..., "David Schnepper" <dschnepper@b...> wrote:
> >
> > 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.
>
> ANSI/ISO SQL92 says:
>
> select <expression> [[AS] alias] is valid
> group by <expression> is not valid
> group by alias is not valid
> order by <expression> is not valid
> order by alias is valid
>
> I think there might have been some changes to these rules in SQL99,
> but I'll have to check and post later ...
>
> > That said, it is an incredibily useful thing to have. And I'm not
> > surprised so many other databases have added it.
>
> Ditto,
> db
>
>
>
> 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/
>
>