What is the meaning of WHERE *= COLUMN NAME

  • Hi,

    What is the meaning of WHERE *= COLUMN NAME in a select query.

    please explain me and also provide some examples.

    Regards,

    Sarath Babu Vellampalli.

    Kindest Regards,

    Sarath Vellampalli

  • Exam or interview?

    Doesn't look like a standard T-SQL statement to me. You can't use a column-wildcard in a Where clause in SQL Server. Ask your prof or interviewer what he means by that.

    And do keep in mind that asking these questions online might count as cheating.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Neither exam or interview (too many points and visits in this case).

    Looks like the old syntax of left join. Not the standard anymore.

  • Those are the old non-ansi style Outer Join references. This was deprecated in SQL 2005. The upgrade advisor in 2005 will inform you of this joins and give you an error telling you they must be refactored.

    Left Join *=

    Right Join =*

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • SQLRNNR (12/21/2011)


    Those are the old non-ansi style Outer Join references. This was deprecated in SQL 2005. The upgrade advisor in 2005 will inform you of this joins and give you an error telling you they must be refactored.

    Left Join *=

    Right Join =*

    My Childhood Memories... am seeing it after a looong time. 🙂

  • Sarath Vellampalli (12/21/2011)


    Hi,

    What is the meaning of WHERE *= COLUMN NAME in a select query.

    please explain me and also provide some examples.

    Regards,

    Sarath Babu Vellampalli.

    From BOL (2008)

    Multiplies by an amount and sets the original value to the result.

    Multiplies two numbers and sets a value to the result of the operation. For example, if a variable @x equals 35, then @x *= 2 takes the original value of @x, multiplies by 2 and sets @x to that new value (70).

    Is that how it is being used in your WHERE clause ?

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • Refresh your memories please 😉

    Below is NON-ANSI outer join example for Oracle. Was it working for SQL Server as well?

    SELECT T1.ID

    FROM

    T1,

    T2

    WHERE

    T1.ID = T2.ID(+) -- OUTER JOIN

  • SQLRNNR (12/21/2011)


    Those are the old non-ansi style Outer Join references. This was deprecated in SQL 2005. The upgrade advisor in 2005 will inform you of this joins and give you an error telling you they must be refactored.

    Left Join *=

    Right Join =*

    Except that's not the syntax in the example in the original post. The join syntax was "ColumnName *= ColumnName", but the example given doesn't have a column name for the left side of the equation. All it does, even in SQL 2000, is generate a syntax error.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Dev (12/22/2011)


    Refresh your memories please 😉

    Below is NON-ANSI outer join example for Oracle. Was it working for SQL Server as well?

    SELECT T1.ID

    FROM

    T1,

    T2

    WHERE

    T1.ID = T2.ID(+) -- OUTER JOIN

    Would have been:

    SELECT T1.ID

    FROM

    T1,

    T2

    WHERE

    T1.ID *= T2.ID -- OUTER JOIN

    in SQL 2000 and earlier.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thanks Gus. I knew SQL Server Join syntax (Non ANSI). I was just trying to recollect whether Oracle Syntax was portable to SQL Server (or vice a versa).

    Thanks to ANSI Standards, many queries can perform on cross-platforms now. 🙂

  • Dev (12/22/2011)


    Thanks Gus. I knew SQL Server Join syntax (Non ANSI). I was just trying to recollect whether Oracle Syntax was portable to SQL Server (or vice a versa).

    Thanks to ANSI Standards, many queries can perform on cross-platforms now. 🙂

    Nope. The two weren't portable.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • GSquared (12/22/2011)


    SQLRNNR (12/21/2011)


    Those are the old non-ansi style Outer Join references. This was deprecated in SQL 2005. The upgrade advisor in 2005 will inform you of this joins and give you an error telling you they must be refactored.

    Left Join *=

    Right Join =*

    Except that's not the syntax in the example in the original post. The join syntax was "ColumnName *= ColumnName", but the example given doesn't have a column name for the left side of the equation. All it does, even in SQL 2000, is generate a syntax error.

    Yeah - I just take that for the OP attempting shorthand.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Now I'm going to have visions of Sybase dancing in my head.

    Todd Fifield

Viewing 13 posts - 1 through 12 (of 12 total)

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