Format Query in SQL View

A

Andrew

How can I format the SQL I write in SQL View. That is, how can I preserve
the indenting and carriage returns I use to make long code easy to read.
Sometimes it is preserved -- the SQL for union queries for example always
retains the formatting I use to type them. But all others, it seems, revert
to a single continuous wrapping line for each clause of the query. This
makes a FROM clause with many outer joins impossible to read.

Thanks.
 
M

MGFoster

Andrew said:
How can I format the SQL I write in SQL View. That is, how can I preserve
the indenting and carriage returns I use to make long code easy to read.
Sometimes it is preserved -- the SQL for union queries for example always
retains the formatting I use to type them. But all others, it seems, revert
to a single continuous wrapping line for each clause of the query. This
makes a FROM clause with many outer joins impossible to read.

In Access, you're stuck w/ that continuous string. That's the way
Access stores the queries. A PITA, but that's all we have.
 
J

John Spencer

If you do it in Access, the answer is "you can't".

Some people keep a text file (word or other editor) and paste the nicely
formatted SQL into the file so they can copy and paste it back into Access
when they need to edit the SQL.
 
A

Andrew

Thanks.

John Spencer said:
If you do it in Access, the answer is "you can't".

Some people keep a text file (word or other editor) and paste the nicely
formatted SQL into the file so they can copy and paste it back into Access
when they need to edit the SQL.
 

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