Query SQL report

B

Boon

Hello,

I have about 20 queries in the database. I am creating a documentation for
the database, and would like to put the SQL of each query in the
documentation as well. The only way I can think of is to open the query in
SQL view, copy the SQL text, and paste it into word document. Do this
one-by-one.

I would appreciate if you have any other ideas to do this. Is there is a way
to export all at once?

thanks!
Boon
 
K

KARL DEWEY

You did not say what version of Access you are running. I have 2007 and do
not see it but older version you would go to Tools - Analyze - Documentor -
click on the Queries tab - select all, click options - select options -
click ok - click ok - out to Word.
 
J

Jeff Boyce

Boon

Have you checked out Access' internal documenter?

As I recall, it will generate the SQL statement for each query you tell it
to check.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

John W. Vinson

I would appreciate if you have any other ideas to do this. Is there is a way
to export all at once?

You can use Analyze... Documentor; set the options the way you want, and save
the report to a file, extract the pieces you want.

Alternatively you can use VBA to loop through the Querydefs collection and
export the SQL property of each query.
 
Z

zpk47274135

Boon said:
Hello,

I have about 20 queries in the database. I am creating a documentation for
the database, and would like to put the SQL of each query in the
documentation as well. The only way I can think of is to open the query in
SQL view, copy the SQL text, and paste it into word document. Do this
one-by-one.

I would appreciate if you have any other ideas to do this. Is there is a
way to export all at once?

thanks!
Boon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top