[thelist] dynamic table sql question

Jay Blanchard jay.blanchard at niicommunications.com
Mon Apr 25 12:57:17 CDT 2005

i'm trying to write a simple query to check each and every table for a 
certain group of phone numbers from another table which lists all the 
jobs and its properties.

this is what i want to do...

select * from (select distinct job_name from jobs)
where phonenumber IN ( <<numbers here>> )

basically, i want to cycle through each job name from the Jobs table, 
and within the same database, there is a table with that Job name.

I.e. Jobs holds: Job1, Job2
and I have the following tables:
in my main listing under the DB.

I am not sure that you have provided enough information here or I just
don't understand, but lets see if we can make order of it. You need to
check a large number of tables for a list of phone numbers from one
table? What is your database software and are you using PHP or ASP or
PERL or anything like that?

More information about the thelist mailing list