Query Criteria Problem

Excuse me while I move this question to the top of the list..lol
 
Hello Goh! I havent heard from you in awhile so I hope everything is ok with you.
This question is for anyone that can help me.

Goh helped me out with a SQL statement awhile back and all I want to do is to change every case of "Actuals" to "Actual Costs from Finance". When I try to run the query I get a "missing operator in query expression" error. Does anyone know why by looking at what I have here? Thanks!

The old statement:
SELECT Actuals.AutoNumber, Actuals.VendorID, Vendors.VendorID, Vendors.VendorName
FROM Actuals LEFT JOIN Vendors ON Actuals.VendorID=Vendors.VendorID
WHERE (((Vendors.VendorID) Is Null));

The new statement:
SELECT[Actual Costs from Finance].AutoNumber[Actual Costs from Finance].VendorID,Vendors.VendorID,Vendors.VendorName
FROM [Actual Costs from Finance]LEFT JOIN Vendors ON[Actual Costs from Finance].VendorID=Vendors.VendorID
WHERE (((Vendors.VendorID) Is Null));
 
SQL means Structured Query Language. A language. The basic rule is that the language elements are separated by spaces, otehrwiseitisverydifficulttounderstandwhatiswhat,alsoforAccess.

YouhaveaworkingSQLstatement, and a screwed-up one. Compare the two.
 
Harsh much? My goodness...

So I put the spaces back in the SQL statement and now I'm getting
"Type Mismatch in Expression".

SELECT [Actual Costs from Finance].AutoNumber, [Actual Costs from Finance].VendorID, Vendors.VendorID, Vendors.VendorName
FROM [Actual Costs from Finance] LEFT JOIN Vendors ON [Actual Costs from Finance].VendorID=Vendors.VendorID
WHERE (((Vendors.VendorID) Is Null));
 

Users who are viewing this thread

Back
Top Bottom