Parse Table Names from Query Def SQL

  • Thread starter Thread starter Leon J
  • Start date Start date
L

Leon J

I would like to be able to determine all the tables that are referenced with
in a querydef (and any subqueries within it, too). Is there a written
library for this or has someone written a routine to do it?

Thanks for any help,

Leon
 
Thanks for the reply, and it's great as far as it goes. What I'm really
looking for (and couldn't find after searching for over an hour myself) is if
someome has already written the parsing code, especially with whatever
recursion or similar method that is needed to get to table names within
subqueries.

Thanks again for getting me going.
 
One more part of the question. Obviously, Microsoft has code to pull all the
table from data stored with the query. Since they also store the location of
the tables above the grid, I assume that it does not parse the sql to get
them. It appears to me that MS may not expose that data in dao or otherwise,
but maybe I'm missing something.
 
Back
Top