Very tough Challenge.....

  • yes sir...I understood the query very well and giving explanation to my friends also.

    thank you sir.

  • You've missed the point, entirely, and I doubt you have any real understanding of the solution.  Good luck, "sir"... you will need it.

    --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)
    Intro to Tally Tables and Functions

  • The question I have is what system was he to write this against? Be funny if he get's it wrong due to SQL difference or if the teacher wanted in ANSI SQL and not T-SQL.

  • Heh... THAT would be funny, indeed.  Thanks, Antares...

    --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)
    Intro to Tally Tables and Functions

  • these "challenge" questions are pretty much always homework...

    ---------------------------------------
    elsasoft.org

  • Heh... Wasn't going to say anything about that so it wouldn't change anything but, I absolutely agree, that's normally a prime give-away.  Another dead give-away is the level of urgency even if the title of the thread doesn't contain the classic "Extremely Urgent" give-away.   The other dead give-away is when they ask for something so ridiculous that just gotta know it's from an instructor that made up a problem to specifically "challenge" the student's ability on a particular set of clauses/functions.

    Other give-aways seem to include "I can't use TOP" or "I can't use a stored proc" or it "has to be a single SELECT" and "How would I write a view to...".  I know, I'm preaching to the choir... you guys have seen these before.

    I actually feel a little bad for these "homework" folks when they think they've done something clever... Like the one on this thread, they don't understand what fools they're going to look like when they actually have to do something real in SQL 'cause they didn't learn anything in the classes they took.  They also don't realize that folks doing the job interviews can easily spot these "clever" dummies. 

    This one is really "clever" because he's going to share the answer with friends so they can be dummies, too.

    --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)
    Intro to Tally Tables and Functions

  • Or when the query includes a half-written stored proc. See the OP's latest posting.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Sorry Gail... operating on my first cup of coffee Do you have the URL for that?

    --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)
    Intro to Tally Tables and Functions

  • Never mind... I found it... should I tell him about the function that's specifically designed to take care of IP addresses?  NOT!!!

    --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)
    Intro to Tally Tables and Functions

  • Easy to forget that one doh!

    Far away is close at hand in the images of elsewhere.
    Anon.

  • There is one? That's news. Could you drop me a private message wit it please?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Comin' right up...

    --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)
    Intro to Tally Tables and Functions

Viewing 12 posts - 16 through 26 (of 26 total)

You must be logged in to reply to this topic. Login to reply