Type mismatch error,, SOmebody help me

gdanalakshmi

Registered User.
Local time
Today, 13:29
Joined
Nov 26, 2002
Messages
102
I have 2 tables.
Table1 has a field StructureID (Number)
Table2 had a field Struture_id (Text)

In the design view I made the JOIN as INNER JOIN.

Since the data types donot match I get a Type Mismatch error. How can i overcome that?? I donot want to make any design changes to the existing table since it was designed by somebody else.


Thanks
 
Just a thought:

If you use Cint, Csng or Cdbl function to convert the text field. Will that help?

Fuga.
 
Use the Function CStr on BOTH sides of your JOIN for your JOIN columns.

RV
 
I would convert the text field to long integer just in case there are leading zeros. 000123 will not = 123 if the fields are text strings.

Actually, I wouldn't do that at all, I would FIX THE PROBLEM (the differing field types) rather than using a bandaid. I find it much less trouble to actually fix things that are wrong rather than continually dealing with the issues caused by design mistakes. Right now you have one query with a problem. I would guess that you'll end up with more.
 

Users who are viewing this thread

Back
Top Bottom