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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting SQL statements

Status
Not open for further replies.

midnightJackal

Programmer
Joined
May 5, 2003
Messages
6
Location
CA
I have some really ugly SQL statements that I would like to format into more easily viewed code; ie. a little bit of indenting, some carriage returns, that sort of thing.

Is there any way to do this in MS ACCESS 97? I have about 400 queries that I would like to make readable, and I can't seem to get the formmating I apply to a section of code to save that way. Every time I re-open a query the formatting that I applied disappears. Is this a glitch, me being stupid, or something that I'm just going to have to live with?

Any help would be greatly appreciated,

amthomas
 
'fraid you'll have to live with it :-(

you might consider doing what i do, keep the source code outside of access

there's just no way i can modify a query in the sql view after access has mangled it

i work on the sql in a text editor and then cut&paste into the query's sql view in access

this allows me to do such things as search and replace easily, for example to change a table name, etc.

search and replace also makes re-formatting an access-mangled query easy (e.g. change every comma to a line break plus several spaces plus a comma)

rudy
 
Thanks, rudy!

That is a really good suggestion, and since I have to oocasionally make presentations on my progress wrt my qureying, I'll already have them in an easily-printable format.

Good tip!

-amthomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top