SQL JOIN syntax

  • Can someone please provide me the LEFT/RIGHT OUTER JOIN syntax for the following query..

    SELECT *

    FROM tbl_PARS_jobStatus js,

    tbl_PARS_rptOrgParams org,

    tbl_PARS_Org1 o1,

    tbl_PARS_Org2 o2,

    tbl_PARS_Org3 o3,

    tbl_PARS_Org4 o4

    where org.strjobname=@strJobName

    and org.strJobName = js.strJobName

    and org.intOrg1Id *= o1.intOrgId

    and js.intLanguage *= o1.intLanguage

    and org.intOrg2Id *= o2.intOrgId

    AND js.intLanguage *= o2.intLanguage

    and org.intOrg3Id *= o3.intOrgId

    AND js.intLanguage *= o3.intLanguage

    and org.intOrg4Id *= o4.intOrgId

    AND js.intLanguage *= o4.intLanguage

    and org.intOrg1Id <> 0

  • Duplicate post...

    http://www.sqlservercentral.com/Forums/Topic420896-146-1.aspx

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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