Gossamer Forum
Home : General : Databases and SQL :

1066 error not uniqe table/alias

Quote Reply
1066 error not uniqe table/alias
Hi,

I am trying to run the following query, which I thought should work, based on my understanding (newly acquired).

SELECT places.center contacts.name FROM places, center

LEFT JOIN places ON places.center = contact.center;

When I run it I get error 1066 not unique table/alias.



TIA

Ramon
Quote Reply
Re: [narsil] 1066 error not uniqe table/alias In reply to
You are not using alias properly in the query...

It should be something like the following:

SELECT p.center, c.name
FROM places p, contacts c
WHERE (p.center = c.center)

OR if you want to use the JOIN syntax (although not necessary unless you have 100,000's of records):

SELECT p.center, c.name
FROM contacts c LEFT JOIN places ON p.center = c.center

Hope this helps.
========================================
Buh Bye!

Cheers,
Me

Last edited by:

Stealth: Feb 21, 2003, 10:21 AM