• BWFC (5/12/2014)


    Jeff Moden (5/12/2014)


    I've started a real pushback on all of this. It's amazing how many of the candidates (something like 22 out of 24) can't answer the first question, which is "using T-SQL, how do you select the current date and time"? If they can't answer that, the interview is over. It's a total waste of time if they can't get beyond that.

    I've only been using T-SQL for just over twelve months and I'm largely self-taught as are the other members of the team. A question like 'how do you select the current date and time?' would actually make me a little nervous. I know how I'd do it:

    Select GETDATE()

    but I'd be worried about the sharp intake of breath and termination of the interview that may follow. I know I don't know the in depth stuff, and I'm constantly learning, but I wouldn't be at all surprised that the basics I thought I knew were wrong.

    If you only had a year's worth of experience, I wouldn't be trying to hire you for a Senior position. 🙂 The other thing is that I start the interview off by explaining to the candidate that I ask no trick questions and that the obvious answer is good enough. Although I'd love for a candidate to be able to actually explain he (s)he'd use Itzik's cascading CTE method to produce a table containing a single column of whole numbers from 1 to a million, I won't fault someone for correctly describing the way to do it with a While loop... that's just a matter of training that I can take care of after we hire someone. Just like the "GETDATE()" or "CURRENTTIMESTAMP" question, though, very few candidates have a clue as to how to do such a thing even with a While loop. It's terribly difficult for me to believe that someone claiming 5 to more than 10 years of experience can't do either.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    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.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)