|
james_b
Starting Member
9 Posts |
Posted - 09/07/2004 : 13:06:45
|
I have a select statement as follows:
select table_name, table_row_id from Table_Link
That produces:
Organization, 1 Organization, 2 Organization, 3 Country, 1 Country, 2
etc
What I need to do is select the data from the relevant table and row_id in the same step, producing something similar to this pseudo-code:
Organization, 1, (select name from organization table where row_id = 1) Organization, 2, (select name from organization table where row_id = 2) Organization, 3, (select name from organization table where row_id = 3) Country, 1, (select name from country table where row_id = 1) Country, 2, (select name from country table where row_id = 2)
So the second half of the sql statement depends on the values that the first half retrieves...
hope this makes sense, thanks for any help :)
James |
|