Type mismatch in query

MarkDonnelly

New member
Local time
Today, 20:58
Joined
Jun 4, 2007
Messages
1
Hi
Hope someone can help

I have a query that is trying to match two tables, one in MSSQL2000 and the other in Access 2003. The matching field in MSSQL is a Text field and in Access the field is a long integer. When I try to run the query it gives a Type Mismatch error.

I've tried all the functions that I can see to convert either of the fields data types but to no avail.

Does anyone know of a way to force a match?

Thanks
Mark
 
Can you change the data type in Access to text? or have you tried the Cstr function in your join?
 
One way to try if Keith's way didn't quite get there is to create a separate query of ONLY the data coming from the SQL table and using CLng to convert the field from SQL to a long.

THEN use that query to join to your table in Access as the field should have been converted.
 

Users who are viewing this thread

Back
Top Bottom