At 04:25 2014-09-17, Ted Roche <[email protected]> wrote:
I think it's delightful that everyone is entitled to their own opinion.
Style in SQL is a pretty individualistic thing. I capitalize SQL command
terms
Let the wars begin?
I wouldn't use the 'h' table alias, as FoxPro can, under some
circumstances, interpret the single letters a through j as shortcuts to the
first 10 work areas. I resort to abbreviation only when the SQL gets too
Can you give an example of this happening?
large to be easily comprehended or you run into compile issues. If the
field list gets large, I break it into separate lines, and sort it by
table, if practicable.
If I need to use aliases, I often use three-letter aliases.
I have an indenting style for my SQL. With all of clauses,
especially when they are long, SQL statements can all-too-easily get
to be write-only.
I prefer the JOIN terminology to separate in my mind the filtering
functions from the table join functions. You can always drop a filter, but
dropping a join term is usually not what you want to do (and can result in
a huge "cartesian join" result that's rarely what you want and often and
can crash or impair the machine).
Summary: This is bad. If it happens to you, you may lose
control of your system for a while.
SELECT winhist.date, invnum, winhist.prodcode, qty, winstocks.name
^^^^
"date" is a reserved word and should be avoided.
[snip]
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: [email protected]
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/
** 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.