SQL error

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)
 
C

Cowboy \(Gregory A. Beamer\)

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!
*********************************************
 
G

George Ter-Saakov

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top