What Is This Operand (*= Star-Equals) in SQL Server 2000

What is this operand (*= star-equals) in SQL server 2000?

In SQL 2000 this was used as a LEFT OUTER JOIN

=* is a RIGHT OUTER JOIN

Your query could be:

SELECT 
*
FROM
tbl1 a LEFT OUTER JOIN tbl2 b ON a.person_name = b.person_name
WHERE
a.id = b.id

As stated here:

Specifies an outer join using the
nonstandard product-specific syntax
and the WHERE clause. The *= operator
is used to specify a left outer join
and the =* operator is used to specify
a right outer join.

SQL Server *= operator

Kill the deprecated syntax if you can, but:

*= (LEFT JOIN)

=* (RIGHT JOIN)

A strange situation regarding searching for '[' in varchar columns in sql server 2000

That character has special meaning in the pattern syntax and needs to be escaped either by defining an explicit escape character

where Col1 like '%/[%' ESCAPE '/'

or by using more square brackets

where Col1 like  '%[[]%'

In addition to its role in escaping characters it is used in the syntax when defining ranges or sets of characters to match. e.g. LIKE '[0-9]%' to find all values starting with a digit.

When the range or set is not closed off with a ] it appears as though SQL Server just adds one on to the end. So c like '%[%' is treated as c like '%[%]' and finds all values containing the % character.

Sql server convert date to 10 digit integer for comparison

You need SELECT DATEADD(second, 1240494225, '19700101') to convert the number to a date and SELECT DATEDIFF(second, '19700101', @some_date) to go the other way.



Related Topics



Leave a reply



Submit