Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Work around Type Mismatch 1

Status
Not open for further replies.

drewcp

Programmer
Jul 31, 2008
30
US
I have the following sql statement

Code:
SELECT UTADBA_PARCEL.PARCEL_ID, UTADBA_PARCEL.LINK_ID
FROM Serial INNER JOIN UTADBA_PARCEL ON Serial.[Parcel ID] = UTADBA_PARCEL.PARCEL_ID;

I know that it is a type mismatch because Serial.[Parcel ID] is a number and UTADBA_PARCEL.PARCEL_ID is a text

I wrote all of this using tables on my database and it worked fine, so i know that the sql code is not a problem, but i had to switch them out for link tables before it could be used. I know that there is a way to put quotes around a part to make it function as text, i don't know how or where though. I tried putting quotes on like this

Code:
SELECT UTADBA_PARCEL.PARCEL_ID, UTADBA_PARCEL.LINK_ID
FROM Serial INNER JOIN UTADBA_PARCEL ON "Serial.[Parcel ID]" = UTADBA_PARCEL.PARCEL_ID;

this is the only way i could put the quotes without it giving me a syntax error; but it does say "JOIN expression not supported"

If anyone could help me with this it would be greatly appreciated.
 
Either:
ON Serial.[Parcel ID] = Val(UTADBA_PARCEL.PARCEL_ID)

Or:
ON Serial.[Parcel ID] & "" = UTADBA_PARCEL.PARCEL_ID

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I used your second suggestion and it worked perfect, thank you so much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top