Ispirer Website Ispirer Capabilities - Microsoft SQL Server Migration Free Trial

Join with constant

Joins in non-ANSI format should be upgraded to ANSI format.

Microsoft SQL Server 2000

SELECTFROM <table_name1>,<table_name2> 
WHERE <column_table1>*=<column_table2> AND <column_table2>=<constant>

Microsoft SQL Server 2008

SELECTFROM <table_name1> 
LEFT OUTER JOIN <table_name2> 
ON <column_table1>=<column_table2> AND <column_table2>=<constant>  

Example: Microsoft SQL Server 2000:

SELECT shop_name 
FROM shop, customer 
WHERE shop.good_id*=customer.good_id AND customer.price=123 AND shop.good= “Milk”

Microsoft SQL Server 2008:

SELECT shop_name 
FROM shop 
LEFT OUTER JOIN customer ON shop.good_id=customer.good_id AND customer.price=123  
WHERE  shop.good= “Milk”

© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.