Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to know which query created a certain table?

Status
Not open for further replies.

hello101

Instructor
Jun 26, 2006
18
0
0
US
Hello,

I inherited an access file with bunch of tables and queries and there's no documentation whatsoever. I have a table created using a query. Can I possibly find out which make table query created that table?

Thank you
 
This may or may not be the best way to do this...

In your Access DB, go to Tools - Analyze - Documenter. Select all of the queries, click on the Options button, check SQL, then click OK, then OK again to run the Documenter. On the resulting report, do a text search for your Table name.
 
If you are brave / foolish, look into "MSysQueries". It is a (normally hidden) system table. It lists all there is to know about all queries in the system. The brave / foolish COULD create a Make Table query, then review the arcanmia info in MSysQueries and spot the identifier which designates the query "type" - and the field which gives the target / destination table. The LUCKY exployer might then be able to do a query on MSysQueries for these attributes. Of course, this (like the previous response) relies on the query remaining in the database, that the source(s) havn't changed, that there is only one such query and other 'lucky tokens' being accepted by those who dispense (and then collect) the tokens.

The aduacious might attempt to compare fields names and / or data types in the target table to the reasonable and possible sources and simply reconstruct the crime?

Then, OF COURSE, one might research the entire code base and see if there is an "Insert Into " statement with the associated table name. In this case, theer would be a method of creating the table without a (Make Table) query.

And, there is the possability of doing the create tabledef thing and populating the targe (presumably you table of interest) which coule be populated with any of several other approaches.

MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top