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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Mismatch in SQL query string..

Status
Not open for further replies.

PogoWolf

Programmer
Joined
Mar 2, 2001
Messages
351
Location
US
ok, now here's an interesting issue..
I have this QueryString:

SELECT Table1.ColumnA,
Table2.Code,
Table2.Description
FROM Table1,
Table2
WHERE Table1.A35 = Table2.Code
AND Table2.Number=1

ALL the fields (except .Number) are text fields
and the .Number is a number field. I tried removing the
.number and that didn't fix the issue.

When I run the query I'm getting a 'type mismatch error' anyone out here have a clue?!

Thanks in Advance!
 
I have no clue really but maybe if you change it to
AND Table2.Number = ToNumber(1)

also see the the Code field from table1 and 2 are the same length, sometimes my crystal gives errors if the fields are different length

 
I'm still not sure where/what the error was, but I posted that query in to msQuery, and ran it and fixed the error.
????

I have no idea either why it didn't work.. but it's working now. =)
******
Darkness... Bleakness...
and Plastic forks...
--The PogoWolf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top