SQL statment syntax error

manared

Well-known member
Joined
Jun 1, 2006
Messages
84
Programming Experience
1-3
I have a SQL statement that keeps returning the error: Syntax error in FROM clause.
Can someone see a problem or suggest something? Thank you!!!

VB.NET:
Expand Collapse Copy
SELECT 
QuoteMaster.ID, 
QuoteMaster.QuoteNumber, 
Customer.CustomerName, 
QuoteForecast.Description 
FROM ((((LookupMaterial 
INNER JOIN (QuoteMaster 
INNER JOIN QuoteEquipment ON QuoteMaster.ID = QuoteEquipment.QuoteID) ON LookupMaterial.ID = QuoteEquipment.Material) 
INNER JOIN QuoteForecast ON QuoteMaster.ID = QuoteForecast.ID) 
INNER JOIN Customer ON QuoteMaster.BuyerID = Customer.ID))) 
WHERE ((QuoteMaster.ProductClass) = 'Bio-Systems');
 
VB.NET:
Expand Collapse Copy
SELECT 
qm.ID, 
qm.QuoteNumber, 
c.CustomerName, 
qf.Description 
FROM 
LookupMaterial lm
INNER JOIN QuoteMaster qm ON lm.ID = qe.Material
INNER JOIN QuoteEquipment qe ON qm.ID = qe.QuoteID
INNER JOIN QuoteForecast qf ON qm.ID = qf.ID 
INNER JOIN Customer ON qm.BuyerID = c.ID
 
WHERE qm.ProductClass = 'Bio-Systems';

quit putting all those brackets in, it makes things too confusing!

SELECT
...
FROM
a
INNER JOIN b ON ...
INNER JOIN c ON ...
INNER JOIN d ON ...
INNER JOIN e ON ...
WHERE
...
 
SQL statements

I've attached most of my search code. I have explained more in the word document to help you understand my situation. I have to search for multiple criteria, but some of them come from different tables in the database. Is this possible to do? Please help! Thank you very much for helping!
 

Attachments

Back
Top