Sorry, but I think that formatting is horrible. Just horrible. Why? Because who said you have to remove white space and new lines? The idea is to not make the output pretty for the SQL engine, but to make changes to your code painless, simple and efficient. And having to concatenate like that is none of the above for me. No, I would not change the original formatting at all. I cannot possible see how leading periods and closing brace at the tab stops beats ... nothing!
See? No periods. No braces. No nothing. Just SQL.my $sql = qq/ SELECT a.somedata1, a.somedata2, a.somedata3, [...] FROM table1 a, table2 b, table3 c WHERE a.somedata4 > ? /;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re^2: Perl style/best practice question: how to [better] embed SQL in code ?
by jeffa
in thread Perl style/best practice question: how to [better] embed SQL in code ?
by Krambambuli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |