On Thu, Oct 31, 2013 at 4:32 AM, Alan Bourke <alanpbou...@fastmail.fm>wrote:
> > Hey, don't forget the One True Brace Style! > Yet another classic! Function foo(bar) { * code } or: Function foo(bar) { * code } or worse! SQL is another formatting nightmare. Whenever I'm using a "helpful" editor, it rearranges the spacing.My design, while somewhat non-standard, is easiest for me to read. I set it up so there's a single column of white space down the entire statement, the first blank space in each line, lined up on the space after select. So, the keywords are flush-right to the eighth column, although the "BY in ORDER and GROUP slip over into the next columns. THis way, I can use the left column as a table of contents into the arguments on the right. Works for me. But any beautify or smart-indenting program makes a mess of the whole thing. SELECT myfieldlist FROM Table1 JOIN Table 2 ON join condition JOIN Table 2 ON join condition WHERE filter condition one AND filter condition two GROUP BY fieldx HAVING aggregate condition ORDER BY field Y It's pretty trivial for that example, but when there are fifty fields and a dozen tables and an outer join or two and a subquery and the printout takes three pages, every little thing you can do to help yourself figure out what's going on helps! -- Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CACW6n4utwbiqW8ZGKPH0G-SP52jQxqvRrDq9Vs=gwivcjbp...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.