[thelist] dynamic table sql question

teke at pullman.com teke at pullman.com
Mon Apr 25 12:54:44 CDT 2005


Union should do the trick.


> 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:
> Jobs
> Job1
> Job2
> in my main listing under the DB.
> 
> 
> I know this syntax fails..  but is there a way to do such a thing?
> 
> 
> 
> I really don't want to go through and do this manually for 300 different 
> job tables to see if those phone numbers are in it.
> 
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 




---------------------------------------------
This message was sent by First Step Internet.
           http://www.fsr.com/




More information about the thelist mailing list