This widget could not be displayed.
Created:
Feb 5, 2009 08:56 AM
| Last Modified:
Feb 5, 2009 5:56 AM
(4194 views)
| Posted in reply to message from 02-04-2009
I recently had success with question two using JSL. First, make a list of your table names, enclosed in curly braces.
TableList = {"003", "004", "005", "Table6", "Table 34", ...};
Then, use a for-loop to step through the table list, constructing a query that you can feed to the "Open Database" command that you've already found. I can't paste the code because this message board interprets some of it as HTML and make it look funny.
---------------------------------------------------------------------------------
For( -insert for loop conditions here- //step through the list and concatenate query
NewQuery = "SELECT DATE, FIELD from " || TableList || " where FIELD < 1;";
currentDT = Open Database( "DSN=*****;UID=*****;PWD=*****;DBQ=*****, etc;", NewQuery);
---------------------------------------------------------------------------------
Sorry that looks so messy, but hopefully you get the idea.
To do this within the database, you would need to use 50 JOIN statements in your SQL query. Do each of the tables share a common field?