Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL error

SQL error

Scheduled Pinned Locked Moved Database
databasehelpsharepointsql-serversysadmin
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    walalawll
    wrote on last edited by
    #1

    Hi all, I have a sql statement that occur error when I run in sql server 2005.... "The query uses non-ANSI outer join operators ("*=" or "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes." update TMP_TABLE_1 set CLASS_NO = coalesce(B.CLASS_NO , B.STUDENT_NO) from TMP_TABLE_1 A, TMP_TABLE_2 B where A.CLASS_NO *= B.STUDENT_NO and A.REQUEST_ID = @requestID But How can I change the sql to Right outer join or left outer join. Please kindly help. Thanks

    M 1 Reply Last reply
    0
    • W walalawll

      Hi all, I have a sql statement that occur error when I run in sql server 2005.... "The query uses non-ANSI outer join operators ("*=" or "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes." update TMP_TABLE_1 set CLASS_NO = coalesce(B.CLASS_NO , B.STUDENT_NO) from TMP_TABLE_1 A, TMP_TABLE_2 B where A.CLASS_NO *= B.STUDENT_NO and A.REQUEST_ID = @requestID But How can I change the sql to Right outer join or left outer join. Please kindly help. Thanks

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      update
      TMP_TABLE_1
      set
      CLASS_NO = coalesce(B.CLASS_NO , B.STUDENT_NO)
      from TMP_TABLE_1 A LEFT JOIN
      TMP_TABLE_2 B
      ON A.CLASS_NO = B.STUDENT_NO
      where
      A.CLASS_NO *= B.STUDENT_NO
      and A.REQUEST_ID = @requestID

      Stability. What an interesting concept. -- Chris Maunder

      W 1 Reply Last reply
      0
      • M Mike Dimmick

        update
        TMP_TABLE_1
        set
        CLASS_NO = coalesce(B.CLASS_NO , B.STUDENT_NO)
        from TMP_TABLE_1 A LEFT JOIN
        TMP_TABLE_2 B
        ON A.CLASS_NO = B.STUDENT_NO
        where
        A.CLASS_NO *= B.STUDENT_NO
        and A.REQUEST_ID = @requestID

        Stability. What an interesting concept. -- Chris Maunder

        W Offline
        W Offline
        walalawll
        wrote on last edited by
        #3

        Thanks you. It helps.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups