Forum Replies Created

Viewing 15 posts - 5,596 through 5,610 (of 7,168 total)

  • RE: CTE race condition?

    The Dixie Flatline (7/8/2011)


    What does your execution plan for the query show? Could you post it here please?

    Ditto on the execution plan. I too am curious.

  • RE: Duplicate key error when inserting into a table that has no records!!! Please help!

    I think you went in the wrong direction...you want to bring these into the GROUP BY:

    ISNULL(mersum.subisonum, 0),

    ISNULL(mersum.repnum, 0)

  • RE: Handle NULLs

    Here is the code including the latest string manipulation approach from tommyh and a variation of the "Union All/Crosstab" approach I put together, both of which remove dups yet still...

  • RE: No error for missing Linked Server?

    Sorry for your troubles Craig...your avatar <edit>your old avatar anyway :-)</edit> is very fitting on this thread 😀

    I have fought with missing or incorrect Linked Servers in non-prod environments and...

  • RE: Handle NULLs

    tommyh (7/8/2011)


    A question which i hope someone might be able to answer about the "Union/Cross tab" solution.

    Okay so lets say we have a result looking like 1, "Tennis", Null,...

  • RE: Handle NULLs

    mikes84 (7/8/2011)


    Regarding these two requirements mikes84:

    1) Do you want duplicates shown in the results?

    2) Does order matter?

    Using our two tables hobby1 and hobby2 here is an example that should answer...

  • RE: Handle NULLs

    I have some re-thinking to do and some more learning to do from your work Jeff...I had suspicions before but it is abundantly clear to me now just how bad...

  • RE: SQL Grouping Data

    ringovski (7/7/2011)


    David Burrows (7/7/2011)


    1. where in the code do I put the alias i need for the column names, eg. issue date as Invoice Date.

    Just add the alias to the...

  • RE: Handle NULLs

    mister.magoo (7/7/2011)


    mikes84 (7/6/2011)


    I have a situation where I'm querying two tables, each that has up to two hobbies listed. The first table has hobby1 and hobby2, and the second table...

  • RE: Handle NULLs

    Nevyn (7/7/2011)


    Please someone tell me what I did wrong:

    You had a typo in your solution (used hobby1 twice from the first table), but that wouldn't effect the performance.

    <edit>I think I...

  • RE: Same statements, different plans?

    Dang...it was sniffing! As soon as I added a set of local variables to the proc and set them to the value of the input parameters I started getting the...

  • RE: Handle NULLs

    mikes84 (7/7/2011)


    opc, what about this for the PARSENAME method?

    SELECT h1.id,

    REVERSE(PARSENAME(REVERSE(REPLACE(RTRIM(

    CASE WHEN h1.hobby1 IS NULL THEN '' ELSE h1.hobby1 + ' ' END +

    CASE WHEN h1.hobby2 IS NULL THEN...

  • RE: Handle NULLs

    mikes84, could you edit your post so the code has some line breaks in it? It's making the page reallllly wide.

  • RE: Handle NULLs

    I upped the ante to see how each technique would really do when presented with more than 5 rows of data in each table and in the process I broke...

  • RE: Handle NULLs

    I'd love to hear from the OP again 🙂 Are you out there mikes84?

Viewing 15 posts - 5,596 through 5,610 (of 7,168 total)