troubleshooting Question

Outer Join error - using non-ANSI Outer join operator

Avatar of lismathis
lismathis asked on
Microsoft SQL Server
1 Comment1 Solution694 ViewsLast Modified:
Have been running this sql for quite some time and now getting an error that we must use ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). I know that we need to replace the *=
But not sure exactly how.
I will need to update several queries going forward so could someone help me with the right code to update the joins correctly? Thanks in advance.
SELECT
    EBase."EbFirstName", EBase."EbLastName", EBase."EbClock",
    EEmploy."EeTermDate",
    EJob."EjLocation", EJob."EjTitle",
    ChItem."CiFlxIDCc" as "deptid", ChItem."CiDescrip" as "Department",
    ChItem_1."CiFlxIDCc" as "TermCode" , ChItem_1."CiDescrip" as "Term Reason",
    Notes."NtAttach",Notes."NtDescrip", 
    Notes."NtUserName",Notes."NtTextData"
    
FROM
    VEBASE AS EBASE,     VEJOB AS EJOB,      VEEMPLOY AS EEMPLOY  ,  VCHITEM AS CHITEM, VCHITEM AS CHITEM_1, VNOTES as NOTES         
WHERE
    (1=1) AND      EBASE.EBFLXID = EJOB.EJFLXIDEB 
          AND      EBASE.EBFLXID = EEMPLOY.EEFLXIDEB 
          AND      EBASE.EBFLXID*= Notes.NTFLXIDEB
          AND      (EJOB.EJDATEBEG <= EEMPLOY.EETERMDATE AND      (EJOB.EJDATEEND >= EEMPLOY.EETERMDATE OR EJOB.EJDATEEND IS NULL)) AND      (EEMPLOY.EEDATEBEG <= EEMPLOY.EETERMDATE AND      (EEMPLOY.EEDATEEND >= EEMPLOY.EETERMDATE OR EEMPLOY.EEDATEEND IS NULL)) AND      (EEMPLOY.EETERMDATE <= '07/27/08' AND     EEMPLOY.EETERMDATE >= '07/01/08' AND NOT(EEMPLOY.EETERMDATE IS NULL)) AND      EBASE.EBFLAGEMP = 'Y'  AND  CHITEM.CIVALUE = EJDEPARTMENT  AND CHITEM_1.CIVALUE = EETERMWHY AND ChItem.ciflxidcc = '415'and ChItem_1.ciflxidcc = '426'
AND NTDATEEND IS NULL
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros