RE: Request for clarification

From: Tony Linde <Tony.Linde-at-leicester.ac.uk>
Date: Tue, 29 Nov 2005 08:39:00 -0000


Sounds like the spec needs to be updated to make all these points clear.

T.

> -----Original Message-----
> From: owner-voql-at-eso.org [mailto:owner-voql-at-eso.org] On
> Behalf Of Yuji SHIRASAKI
> Sent: 29 November 2005 07:34
> To: kea-at-ast.cam.ac.uk
> Cc: voql-at-ivoa.net
> Subject: Re: Request for clarification
>
>
> Hi Kona Andres,
>
> > Question 1 -
> > I am inferring from the above that in *any* ADQL query, it is
> > necessary to declare an alias for each and every table
> referenced in
> > that query - is that correct? In other words, the
> unambiguous query
> > "select ra,dec from mytable" is invalid ADQL because it
> lacks an alias
> > declaration for mytable?
>
> Yes, you must have table alias in ADQL.
> "select ra, dec from mytable" should be "select ra, dec from
> maytable t".
>
> > Question 2 -
> > As I understand it, SQL uses the syntax "from table as t"
> rather than
> > "from table t" when declaring aliases. Am I incorrect here, or if
> > not, should we be including the "as" keyword in our ADQL/s alias
> > declarations?
>
> You may omit "as" keyword. So both "from table t" and "from
> table as t"
> are valid.
>
> > Question 3 -
> > If it is compulsory to declare aliases for all tables, is it also
> > compulsory to *use* table alias prefixes for all column
> references in
> > a query, even when they are otherwise unambiguous?
>
> No. You don't need to use the table alias prefix if it is unambiguous.
>
> ---
> Yuji SHIRASAKI, Research Fellow +81-422-34-3579 (tel)
> National Astronomical Observatory of Japan +81-422-34-3840 (fax)
> Osawa, Mitaka, Tokyo, Japan
> yuji.shirasaki-at-nao.ac.jp
>
>
>
Received on 2005-11-29Z09:40:24