Triangular Join

  • All,

    I want to know whether my code is using RBAR logic or not.

    UPDATE #PfManager

    SET monthEnd = ( select MAX(dt)

    FROM PMag A

    WHERE #PfManager.SP = A.SP

    AND A.sno IN ( SELECT MID FROM Mgr WHERE SP = #PfManager.SP)

    AND A.Type <>'T' Group BY SP)

    where #PfManager.Flag ='P'

    whether it comes under Set Based or RBAR or Hidden RBAR. I hope it comes under Hidden RBAR.

    if yes, How to overcome Hidden RBAR in this kind of situation ?

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

    when I read about (Traingular Join)Hidden RBAR, I got confused.

    = or "Equality" Triangular Join

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

    SELECT MID,Status,SP,DateStart ,DateEnd ,CheckDate = DATEADD(dd,-(DATEPART(dd, DATEADD(mm,N,DateStart))), DATEADD(mm,N,DateStart))

    INTO #FinalResult

    FROM #Result,Tally

    WHERE N <= DATEDIFF(MONTH,DateStart,DATEADD(MM,1,DateEnd))

    whether it comes under Set Based or RBAR or Hidden RBAR.I hope it also comes under Hidden RBAR.

    if yes, How to overcome Hidden RBAR in this kind of situation ?

    Suggestions are welcome !

    karthik

  • Also asked and answered here

    http://www.sqlservercentral.com/Forums/Topic492872-8-5.aspx#bm498859


    N 56°04'39.16"
    E 12°55'05.25"

  • whether it comes under Set Based or RBAR or Hidden RBAR. I hope it comes under Hidden RBAR.

    if yes, How to overcome Hidden RBAR in this kind of situation ?

    I need answer for the above question.

    Honestly expecting some good suggestions.

    karthik

  • Any Inputs ?

    karthik

  • I think people are tired of answering same question over and over again.


    N 56°04'39.16"
    E 12°55'05.25"

Viewing 5 posts - 1 through 5 (of 5 total)

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