Title: Something completely different
I'm currently working on something very similar. We have a national database of zip code information provided by USPS. each table in our db is prefixed with the first three digits of a given zip code.  ex. (190_zip, 191_zip, 192_zip, etc) each table has the exact same layout. the way we have handled your scenario is as follows.
 
in db we create two tables
    app_call
    app_call_params
 
when user begins "building a list" by specifying zip codes we insert a record into app_call, get back the id and insert the first zip code into app_call_params table hat is keyed to call. we set the current call_id as a user var.  we then have several other options that the user can filter the selections by like the addition of more zip codes, each is stored in the app_call_params
 
when the user has completed the filter selections and executes the call we perform a query on the  app_call_params table to bring back all params into an array. we then use those vars in a loop that builds the dynamic sql based on app_call_param_type values in the result. because each table is prefixed by first three digits of zip code we are able to use a string function to manipulate that entered zip code value to target the appropriate database table in the select.
 
From here we move the data we "got from the well" into a normalized temp table, at that point all manipulation of selected data is performed on temp table and we never have to "go back to the well" unless we want to re-execute the last call or build a new call.
 
I hope this helps 
 
csmith 
-----Original Message-----
From: Wolf, Gene [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 1:46 PM
To: [EMAIL PROTECTED]
Subject: Witango-Talk: Something completely different

   OK, this may be way off the wall but I figured one of you folks would have tried this, or know it can't be done. I have a number of excel spreadsheets that I will be reading data from using Witango. There are about 14 of these sheets and I have working ODBC links to each one of these. Now, the format of all of these sheets is exactly the same and I need to be able to create the exact same reports from each of these spreadsheets. Is there any way I can change the table I'm looking at in either a search action or a direct DBMS so I can loop through a list of table names and create the reports without duplicating the code for every table?

   Does this make sense to anyone? *laughs*

Gene Wolf
Business Systems Analyst, TLMN
DRS Optronics, Inc.
2330 Commerce Park Drive
Palm Bay, Florida  32905
Phone: 321-309-0685
E-mail: [EMAIL PROTECTED]


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to