Hello,
I have two tables which have 100% varchar fields, I am trying to join them together based on a single varchar field. But it never returns a result.
Here is what I am doing:
select * from WV,WVCategories
where WV.CategoryID = WVCategories.ID;
select * from WV,WVCategories
where strcmp(trim(WV.CategoryID)
,trim(WVCa
tegories.I
D)) = 0;
Both return 0 results.
However, if I change the fields shown above to integers, the queries work fine. How do I make this work with the varchar fields? I have a bunch of tables (100+) that need to be joined in this way, and are only temporary. Im not interested in altering all the tables and fields.
Im using mysql 5.
Worth 500 points.
Thanks,
Rick
Start Free Trial