Forum Replies Created

Viewing 15 posts - 451 through 465 (of 600 total)

  • RE: run sprocs with date

    The parameter is a varchar (a string), and must be converted to an int for his calculation.

    So it can't have / in it.

    assuming he wants year last (is start date...

  • RE: A type of string search.

    Charles Deaton (7/11/2011)


    I looked at full text for this and can't see that it would work. We do currently use full text but on a "comment" value stored in the...

  • RE: Handle NULLs

    Heh, my first time bit of practice using UNPIVOT, and I discover that I should never seldom use it.

    Now I have to find an excuse to practice using CROSS APPLY.

  • RE: Handle NULLs

    opc.three (7/8/2011)


    SQLkiwi (7/8/2011)


    opc.three (7/8/2011)


    Would you mind grabbing the whole chunk of code from my last post and posting the results from running it on your machine?

    16-core test machine:

    ---------------------------------------------------------------------------

    build temp tables

    ---------------------------------------------------------------------------

    String...

  • RE: Handle NULLs

    opc.three (7/8/2011)


    Nevyn (7/8/2011)


    I did misunderstand. I thought you were talking about duplicates in terms of records, not hobbies. Duplicate hobbies are allowed.

    Do you want to show 4 nulls if there...

  • RE: Handle NULLs

    I did misunderstand. I thought you were talking about duplicates in terms of records, not hobbies. Duplicate hobbies are allowed.

    Do you want to show 4 nulls if there is a...

  • RE: Handle NULLs

    Jeff Moden (7/7/2011)


    For what it's worth, here's my rendition of how this problem might be solved. It doesn't preserve dupes and it sorts the HobbyNames on each row alphabetically....

  • RE: Handle NULLs

    I think you misunderstood the question, Mike. They are asking if the same hobby (Tennis in the example) appears twice in the four possible hobby records whether you want...

  • RE: multiple inner join on the same table

    Is the query above correct? Why would you link the tables on the two identity rows?

    Was that meant to be "inner join EMaster a on a.sid = b.salesofficerid"??

    Anyway, the answer...

  • RE: Handle NULLs

    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.

    But doesnt this build...

  • RE: Multiple OUTER JOIN query is slow

    My first instinct would be to create a nonclustered index on EvidenceLetter in Podrobnosti, and then populate the form using a stored procedure that takes EvidenceLetter as input and performs...

  • RE: Handle NULLs

    Yeah, I'm not sure if he thought he'd get 6 or 7 different working answers.

  • RE: Handle NULLs

    The string manipulation is probably the fastest.

    I wanted to try the UNPIVOT/PIVOT just for the heck of it.

    Using Opc.Three's test setup, here is what I did first:

    ;WITH OneTableCTE AS

    (

    SELECTa.id,

    a.hobby1...

  • RE: Handle NULLs

    Can't you just unpivot and then repivot?

  • RE: Need T-SQL help aggregating like records resulting with start date and end date

    gary.proctor (7/6/2011)


    Wow.

    Thank you for the immediate responses.

    Unfortunately I abreviated the example for the sake of space.

    While MIN & MAX solution will work nearly every time...

    It is possible...

Viewing 15 posts - 451 through 465 (of 600 total)