"=*"

  • :hehe: I am in the process of trying to make db projects in VS2005 TFS. I am getting an error in one current project that says the following: The query uses non-Ansi outer join operators("*=" or "=*"). to run this query without modification, please set the compatibikity level for current database to 80 or lower, ....blah blah blah ( I can't mess with the compatibility level).......or rewrite the query using ANSI outer join operators. I am not even sure what "=*" means. Can anyone help me, so I can get rid of this error???

    Thanks!!!!


    Thank you!!,

    Angelindiego

  • Angelindiego (11/10/2008)


    :hehe: I am in the process of trying to make db projects in VS2005 TFS. I am getting an error in one current project that says the following: The query uses non-Ansi outer join operators("*=" or "=*"). to run this query without modification, please set the compatibikity level for current database to 80 or lower, ....blah blah blah ( I can't mess with the compatibility level).......or rewrite the query using ANSI outer join operators. I am not even sure what "=*" means. Can anyone help me, so I can get rid of this error???

    Thanks!!!!

    *= and =* are obsolete formats for doing an left and right outer joins in the where clause. They are not supported in database compatibility mode 90 (2005) and above.

    You will have to do one or the other to fix it:

    "I can't mess with the compatibility level).......or rewrite the query using ANSI outer join operators. "

  • Fair enough....I would like to re-write it, but I am not sure what '=*" means??

    It is in this context in my query:

    select

    something s

    from

    somewhere ss

    where

    s.ID =* ss.ID

    what does that say in English??

    thank you!!!


    Thank you!!,

    Angelindiego

  • Would you please post the actual query? What you posted makes no sense to me.

  • Angelindiego (11/10/2008)


    Fair enough....I would like to re-write it, but I am not sure what '=*" means??

    It is in this context in my query:

    select

    something s

    from

    somewhere ss

    where

    s.ID =* ss.ID

    what does that say in English??

    thank you!!!

    That query means nothing. If you have query like this:

    Select

    Columns

    From

    tableA as A,

    tableB as B

    Where

    A.id =* B.id

    Which in standard ANSI would be:

    Select

    Columns

    From

    tableA as A Right Outer Join

    tableB as B ON

    A.id = B.id

  • Angelindiego (11/10/2008)


    Fair enough....I would like to re-write it, but I am not sure what '=*" means??

    It is in this context in my query:

    select

    something s

    from

    somewhere ss

    where

    s.ID =* ss.ID

    what does that say in English??

    thank you!!!

    It is a right outer join.

    From SQL Server 2000 Books Online:

    "Transact-SQL Joins

    In earlier versions of Microsoft SQL Server 2000, left and right outer join conditions were specified in the WHERE clause using the *= and =* operators. In some cases, this syntax results in an ambiguous query that can be interpreted in more than one way. SQL-92 compliant outer joins are specified in the FROM clause and do not result in this ambiguity. Because the SQL-92 syntax is more precise, detailed information about using the old Transact-SQL outer join syntax in the WHERE clause is not included with this release. The syntax may not be supported in a future version of SQL Server. Any statements using the Transact-SQL outer joins should be changed to use the SQL-92 syntax."

  • Sorry about my silly query, it was not complete...my bad. You explained it so I can understand it, and I thank you all for helping me out here. I can now re-write this query!! THANK YOU!!


    Thank you!!,

    Angelindiego

Viewing 7 posts - 1 through 6 (of 6 total)

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