I created a small mapping table to associate values with values from another table. When I perform the select I get back 4million reocrds~.
I know it has to be something trivial I'm doing. Would appreciate if someone could A) Tell me what I'm doing wrong and B) Tell me what literature I should be reading so I understand these issues :) (Websites, books etc.)
select u.uid,
l.catid
from usersmap u,
locmapping l
where u.prodid = l.prodid
Sorry as for the extra data I'm getting back I'm assuming its duplicated in some form. What the query is attempting to do is get a user id and product id. I'm trying to replace product id with a category id which is coming from the other table.
The database structure is as follows
locmapping (Table)
- id (int)
- catid (int)
- prodid (varchar25))
usermap (Table)
- id (int)
- prodid (varchar)
- uid (varchar)
The old situation I had was just to select prodid, uid from usermap
But now I'd like to make prodid equal to catid. I use the locmapping to create these mappings (In theory :) )