Problem with INNER JOIN SQL statement
Posted by:
Paul Cooper
Date: September 18, 2006 11:37AM
I have two tables and am trying to do an inner join and getting this error message:
Not unique table/alias: 'tblClients'
These are my two tables:
tblClients
- ClientID
- LicenseeID
- CreationDate
- EmailAddress
- FirstName
- LastName
- Company
tblResults
- ResultID
- GroupID
- ClientID
This is the SQL statement causing the error:
strSQL = "SELECT tblClients.ClientID, tblClients.LicenseeID, tblClients.CreationDate, tblClients.EmailAddress, tblClients.FirstName, tblClients.LastName, tblClients.Company, tblResults.ResultID, tblResults.GroupID, tblResults.ClientID FROM tblClients INNER JOIN tblClients ON tblResults.ClientID = tblClients.ClientID WHERE tblClients.LicenseeID = " & strID & ";"
What I’m trying to do is get all the data from tblClients and then when I loop through them later see if there is an entry for each ClientID in tblResults.
Can someone point out where I’m going wrong with my SQL statement?
TIA
Paul
Subject
Written By
Posted
Problem with INNER JOIN SQL statement
September 18, 2006 11:37AM
September 18, 2006 12:23PM
September 18, 2006 02:09PM
September 18, 2006 02:56PM
September 18, 2006 05:57PM
September 19, 2006 05:37AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.