Forum Replies Created

Viewing 15 posts - 1,831 through 1,845 (of 3,957 total)

  • RE: tricky many to many query

    kevin 20860 (4/4/2013)


    Ok not sure If I've got it right but if I add "where a.left not in (select id from dbo.ufn_Split(c.path) )" after the Inner join it appears to...

  • RE: tricky many to many query

    ben.brugman (4/4/2013)


    Thanks Dwain,

    This does solve all routeplanning problems πŸ˜›

    Thanks

    Ben

    If it did then I'd be well on my way to fortune and glory. Alas, that is not the case.

    The article...

  • RE: tricky many to many query

    kevin 20860 (4/4/2013)


    Dwain (or anyone!)

    Is there any way to detect an prevent this crashing on a circular reference? I need to have it support a circular ref but using this...

  • RE: A Hazard of Using the SQL Merge Statement

    Jeff Moden (4/3/2013)


    I guess I understand the concern some folks have with the title but I personally don't see a thing wrong with it. If you're not aware of...

  • RE: Are the posted questions getting worse?

    jasona.work (4/3/2013)


    Lynn Pettis (4/3/2013)


    I'm curious, how do most of you like your dihydrogen monoxide, straight or flavored?

    Depending on the time of day, either straight or filtered through ground-up and roasted...

  • RE: A Hazard of Using the SQL Merge Statement

    Steve Jones - SSC Editor (4/3/2013)


    Interesting, and thanks for the piece. I definitely learned something here.

    So you're saying you can teach an old dog new tricks? πŸ˜›

    Thanks Steve for editing...

  • RE: A Hazard of Using the SQL Merge Statement

    Steven, tspade and all the others (Phil expecially for multiple visits :-)) that have chimed into this lively discussion, my thanks for both your time reading the article and contributing.

  • RE: A Hazard of Using the SQL Merge Statement

    Jim Sebastiano (4/3/2013)


    ChrisM@Work (4/3/2013)


    I think Dwain knows a thing or two about table constructors [/url]already πŸ˜›

    I guess old habits die hard!

    Jim - I do get very excited about new things...

  • RE: A Hazard of Using the SQL Merge Statement

    vliet (4/3/2013)


    We tried both the CTE approach and the AND clause on the WHEN NOT MATCHED BY SOURCE part to merge rows spanning only a certain period. The performance of...

  • RE: A Hazard of Using the SQL Merge Statement

    the sqlist (4/3/2013)


    If the bound errors happens than you will have to replace it with an EXISTS condition:

    ... and exists (select * from #test2 where id =t.id)

    The author was kind...

  • RE: A Hazard of Using the SQL Merge Statement

    Mike McIver (4/3/2013)


    ... here's a stab at it:

    SELECTDISTINCT

    COALESCE(b.ID, a.ID), COALESCE(b.RowNo, a.RowNo), COALESCE(b.Value, a.Value)

    FROM#Test1 a FULL OUTER JOIN

    #Test2 b

    ONa.ID = b.ID

    ANDb.RowNo IS NOT NULL

    ORDER BY

    1,2

    It may be all wrong ...

    Mike -...

  • RE: A Hazard of Using the SQL Merge Statement

    mmahon (4/3/2013)


    Hi Dwain -

    I have a technical lack of understanding as to how the cte and Merge work together. Hopefully you can explain it to me. While...

  • RE: A Hazard of Using the SQL Merge Statement

    R.P.Rozema (4/3/2013)


    dwain.c (4/3/2013)


    P Jones (4/3/2013)


    As another MERGE fan I'd use

    WHEN NOT MATCHED BY SOURCE AND (t.ID = s.ID) THEN DELETE;

    in the original merge statement.

    But I've no complaints about...

  • RE: A Hazard of Using the SQL Merge Statement

    the sqlist (4/3/2013)


    al_kessler (4/3/2013)


    P Jones (4/3/2013)


    As another MERGE fan I'd use

    WHEN NOT MATCHED BY SOURCE AND (t.ID = s.ID) THEN DELETE;

    in the original merge statement.

    But I've no complaints...

  • RE: A Hazard of Using the SQL Merge Statement

    Mike McIver (4/3/2013)


    David is absolutely 10% correct.

    The "hazard" is given here:

    "Hastily, we consult MSDN"

    and

    "A quick scan of the article"

    and

    "Obviously this must be the ticket, so let’s give that...

Viewing 15 posts - 1,831 through 1,845 (of 3,957 total)