Anyway: be sure that both fields (blPayAppLineItems.LineItemID and tblProjectLineItems.LineItemID) are of the same datatype.
Also beware of 'SELECT *': it means you want to get all the fields of both tables, that might be more then you need.
At last: be sure both field are indexed...
Your join says that you are joining a table to itself
Viz. [tt]
tblProjectLineItems INNER JOIN tblProjectLineItems
[/tt]
but your ON condition specifies different tables
Viz. [tt]
ON tblPayAppLineItems.LineItemID = tblProjectLineItems.LineItemID
[/tt]
Either you want the same table with aliases [tt]
Select *
FROM tblProjectLineItems A INNER JOIN tblProjectLineItems B
ON A.LineItemID = B.LineItemID
[/tt]
or different tables in the join [tt]
Select *
FROM tblPayAppLineItems INNER JOIN tblProjectLineItems
ON tblPayAppLineItems.LineItemID = tblProjectLineItems.LineItemID
[/tt]
Thanks Golem that did the trick for removing the error. But now for some reason I can't fill the grid with the information from that. I'm using Component One TDBGrid. I know I'm doing something wrong but don't know what it is.
Again thanks it sure did solve the problem with the INNER JOIN problem.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.