I need to get a list of IDs from a table, and then link those IDs up with a 'pretty' name for the same thing in a different table, rather than use a while loop in perl to get these one at a time, which is very slow, I would like to do a JOIN, but I simply cannot get this to work, I either get all the contents of the table or none at all. What I need to do is something like this.
SELECT A FROM TABLE1 WHERE B = '2';
This would return 5 records, now I need to say:
SELECT PrettyName FROM TABLE2 WHERE A = 'one of those 5 records'.
I have tried a lot of things but cannot seem to get the right results.
TIA
Garry
SELECT A FROM TABLE1 WHERE B = '2';
This would return 5 records, now I need to say:
SELECT PrettyName FROM TABLE2 WHERE A = 'one of those 5 records'.
I have tried a lot of things but cannot seem to get the right results.
TIA
Garry