I've been working with a young developer for over a year on trying to get her to format any SQL she writes, SSIS or SSRS packages. Since I do most of her code reviews I thought that she was getting on board with it. She asked for help on an SSRS report she was working on, she sent me the SQL , it was all over the place as far as formatting. I asked her why it wasn't formatted correctly, she said it was the developer that worked on it prior to her. I know this is BS since I reviewed his code as well. I just wanted to scream at her "Why the 'F' isn't this formatted correctly?" Then she tries to use a MAX or ROW_NUMBER to get just one row back instead of taking the time to join the tables properly. I know the MAX or ROW_NUMBER is needed in certain situations but not EVERY WHERE. Sorry, just wanted to vent.
You made a mistake - you should have told her straight away that you had seen the code before she took it over and it was properly formatted then. Maybe she knew that anyway, but tried it on in attempt to make you give in without too much fuss - apparently a successful attempt, so you've probably encouraged her to invent false excuses again in the future.
Again, totally agreed. This would have been the correct spot set a mentor-like but very firm precedent and to let people know that, although you may have been born at night, it wasn't last night. 😉
is pronounced "ree-bar
" and is a "Modenism
" for R
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
"If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
"Change is inevitable... change for the better is not."
When you put the right degree of spin on it, the number 3|8
is also a glyph that describes the nature of a DBAs job. 😉
How to post code problems