-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 16 August 2005 15:04
To: Andrew Hargreaves
Cc: mysql@lists.mysql.com
Subject: Re: Why does this fail
"Andrew Hargreaves" <[EMAIL PROTECTED]> wrote on 08/16/2005
09:13:56 AM:
> Can anyone e
"Andrew Hargreaves" <[EMAIL PROTECTED]> wrote on 08/16/2005
09:13:56 AM:
> Can anyone explain why this SQL statement would fail? A friend was asked
it
> in a pre-interview assessment and it threw him a bit.
>
> SELECT T1.BldgName T1.StreetName, T1.Locality, T1.PostTown from PstlAddr
T1
> Where
Isn't AS optional?
-Original Message-
From: Raz [mailto:[EMAIL PROTECTED]
Sent: 16 August 2005 14:19
To: Andrew Hargreaves
Cc: mysql@lists.mysql.com
Subject: Re: Why does this fail
For a start, spot the missing AS...
raz
--
No virus found in this incoming message.
Checked by AVG
[snip]
Can anyone explain why this SQL statement would fail? A friend was asked
it
in a pre-interview assessment and it threw him a bit.
SELECT T1.BldgName T1.StreetName, T1.Locality, T1.PostTown from PstlAddr
T1
Where T1.City='London' AND NOT EXISTS (SELECT T2.Pstl_Address_PK from
PrsnAddress T2
> Can anyone explain why this SQL statement would fail? A friend was asked it
> in a pre-interview assessment and it threw him a bit.
>
> SELECT T1.BldgName T1.StreetName, T1.Locality, T1.PostTown from PstlAddr T1
> Where T1.City='London' AND NOT EXISTS (SELECT T2.Pstl_Address_PK from
> PrsnAddres
First glance -- It's missing a comma (,) between T1.BldgName and
T1.StreetName, Missing a period (.) in PstlAddr T1 and in PrsnAddress T2
Also, how does the system know the table names if you are putting them
first, (i.e. shouldn't it be BldgName.T1 not vice versa)?
You don't define what T1 is, u
For a start, spot the missing AS...
raz
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]