|
|
|
|
|
by abower
2340 days ago
|
|
100% this. Nothing is more aggravating than having to go through someone elses SQL mess and having to reformat with commas in front. Why you ask? First, its trivial to comment a value out for testing/debugging etc, but secondly if you don't and you are reading through a large query, it is far more difficult to scan to see what fields are included, being aliased, incorporated into calculations or functions etc.
This ties to the longer code, less clever mantra noted prior in the thread.
The else comment I get, but I still use it and typically set it to a code or value that will push the error further up the stream.
We do a lot of system to system integration so often the else part is arising from missing setup info from the source or destination so surfacing it later can ( depends on use case of course) sometimes make it easier for end users to self fix the problem by updating one of said source or destination systems. |
|