Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can not find input table or query

Status
Not open for further replies.

mygmat123

Technical User
Jun 28, 2004
56
US
I'm having trouble with this SQL.


SELECT table1.*
FROM table1 LEFT JOIN [SELECT * FROM table2 WHERE field1="12345"] AS alais2 ON table1.field2=alais2.field3;


When I run this with no join it works fine, but when I add a left join, I get the error.....

"The Microsoft jet database engine cannot find the input table or query "SELECT * FROM table2 WHERE field1="12345"" Make sure it exists and that its name is spelled correctly."

I know "SELECT * FROM table2 WHERE field1="12345"" is a valid sql statement because I can run it fine alone. What am I missing?

thank you
 
The subquery must be between parens, not brackets.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top