• Michael L John (5/22/2015)


    Jeff Moden (5/22/2015)As for "standard technical questions", they are a must. The difference is that you don't just sit there and listen to the applicant...

    This is exactly the key when asking technical questions.

    "How do you get the current data and time using T-SQL" is not a good question.

    A better way to ask the same question may be something like "You need to record the date and time of when a row is inserted into a table. What mechanism would you use?"

    That is open ended.

    A person may answer "Use a default with getdate()". Another person may answer that question with a number of other questions.

    Which one gets the position?

    Not quite my meaning. Asking how you get the current date and time is perfect because, if they've done it before, they will answer it correctly. Of course, they might answer it correctly even if they haven't done it before and you can normally detect that because they'll state the answer with questioning tones. "ummmm... GETDATE()???".

    Whether they answer that question correctly or not or with questioning tones is the segue into a similar line of questioning. For example...

    1. Is that the only way you can do this?

    2. What is the difference between the function(s) you mentioned and GETDATE().

    3. When would you use those functions instead of GETDATE() and why?

    4. How would you strip the time off of GETDATE() and why would someone need to do such a thing?

    5. Given a StartDate and an EndDate, how would you calculate the duration/elapsed time the two dates represent? Is that same method possible with DATETIME2? Why or why not?

    What's actually the best is when I don't have to pull such information out of the applicant. I love it when I ask the simple current datetime question and the applicant tells me 6 different functions, the datatype for each function, the advantages and disadvantages of the functions, and when/not when to use the various datatypes/functions, all without asking and all within about 5 minutes and that includes actual experience instead of just rote book knowledge.

    --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)