Forum Replies Created

Viewing 15 posts - 7,036 through 7,050 (of 7,608 total)

  • RE: Exercises in t-SQL

    Jeff Moden (12/4/2012)


    ScottPletcher (12/4/2012)


    It would take far longer than 2 minutes to give the full background you wanted.

    This for a simple, introductory interview q, when I often had two more...

  • RE: Calculate weekend

    Pete Cox (12/4/2012)


    YYYYMMDD is in fact the Basic date format proposed by ISO8601.

    YYYY-MM-DD is named the Extended format.

    Using either is OK by the standard.

    Excellent point, and quite correct (I just...

  • RE: Exercises in t-SQL

    Jeff Moden (12/4/2012)


    ScottPletcher (12/3/2012)


    Jeff Moden (12/3/2012)


    If I were in an interview and someone asked me such a question, my answer would be that future requirements could easily change, especially in...

  • RE: Exercises in t-SQL

    Jeff Moden (12/3/2012)


    If I were in an interview and someone asked me such a question, my answer would be that future requirements could easily change, especially in the area of...

  • RE: Select query to determine unique values

    SELECT

    GrpID, GrpName,

    ISNULL(NULLIF(MAX(CASE WHEN Spc <> 'Mixed' THEN Spc ELSE '' END), ''), 'Mixed') AS Spc

    FROM #mytable

    GROUP BY

    GrpID, GrpName

    HAVING

    MAX(CASE WHEN Spc = 'Mixed' AND PrvName =...

  • RE: plant count really high-Activity Monitor

    Hmm, something seems odd.

    SQL should be able to easily do "simple parameterization" -- the old name, "auto-parameterization", seems clearer to me -- on that query. That is, SQL should...

  • RE: SPLIT RANGE TOOK 10 HRS to Complete

    What was the status of the log file when you ran the command? How large was the log, how much space was free, and what was the Autogrowth amount?

    Be...

  • RE: Calculate weekend

    CELKO (12/1/2012)

    Please learn to use the ISO-8601 date formats; it is the only one allowed in Standard SQL and the other ISO Standards. Use the DATEADD() function for this.

    Or,...

  • RE: Exercises in t-SQL

    CELKO (12/1/2012)

    CHECK (test_nbr BETWEEN 1 AND 3),

    Seriously, test_nbr limited to 3? What about previous classes? And classes for the next semester? Test_nbr would be identifier,...

  • RE: Exercises in t-SQL

    Jeff Moden (11/30/2012)


    ScottPletcher (11/30/2012)


    Jeff Moden (11/30/2012)


    ScottPletcher (11/30/2012)


    Jeff Moden (11/29/2012)


    That's a good test question, Scott. The only thing I might change is requiring them to do it "in a single...

  • RE: Exercises in t-SQL

    CELKO (12/1/2012)


    I use this query as extra credit for my students when I teach a SQL class. ... This is much trickier than it sounds at first....

  • RE: Exercises in t-SQL

    Eugene Elutin (11/30/2012)


    ... and got some pretty mediocre answers from (supposedly) experienced and skilled T-SQLers.

    I am not be surprised when good skilled T-SQLers come up with stupid answers on paper...

  • RE: Exercises in t-SQL

    capnhector (11/30/2012)


    ScottPletcher (11/30/2012)


    Eugene Elutin (11/30/2012)


    ScottPletcher (11/30/2012)


    ...

    In the interests of being thorough, I added a Message to my proposed solution back to them:

    SELECT

    ...as above...,

    ...

  • RE: Exercises in t-SQL

    Eugene Elutin (11/30/2012)


    ScottPletcher (11/30/2012)


    ...

    In the interests of being thorough, I added a Message to my proposed solution back to them:

    SELECT

    ...as above...,

    CASE WHEN...

  • RE: How to use values keyword as parameter of a function

    Jeff Moden (11/29/2012)


    capnhector (11/29/2012)


    EDIT: This is also for me to play with a couple of things and get more experience with them. so it may not be fast...

Viewing 15 posts - 7,036 through 7,050 (of 7,608 total)