SQL error

  • Thread starter Thread starter Daz01
  • Start date Start date
D

Daz01

I am trying to execute a query from an Access Database using SQL in
Visual Web Developer. I keep getting an error message saying: Type
Mismatch in expression!

Have I made an error in my SQL statement?

Statement below

SELECT Products.ProductID, Products.SupplierID,
Products.ProductName, Price.UnitPrice
FROM (Products INNER JOIN
Price ON Products.ProductID = Price.ProductID)
 
You are more likely mismatching the output to the wrong type. The SQL
statement looks fine.

You should post some of the actual code if you cannot figure out where the
type mismatch is and mention which line is the actual line where the error
is.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*********************************************
Think outside the box!
*********************************************
 
You will get type mismatch if Products.ProductID type is not matching
Price.ProductID.
Then SQL engine will try to do a conversion and if lets say
Product.ProductID is integer and Price.ProductID is text and actual value
for one of the records is 'abc' for example you will get "Type Mismatch"
when SQL engine will try to convert 'abc' to integer.

PS: I do not think those parenthesis needed.

George
 
Back
Top