Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 T-SQL 2000 to T-SQL 2008

Author  Topic 

asyssolvers
Starting Member

9 Posts

Posted - 2011-04-25 : 17:08:28
Hi there,

I have a query in SQL 2000 DB and I need to migrate it to SQL 2008 DB. It works fine in SQL2000 and I j’t need to revamp it into SQL2008. Below is the query in SQL2000. Please guide me how can we overload *= , =* clause in ON clause.

SELECT tblacc. *
FROM tblacc,
tblst,
tblreceipt,
tblrtemp,
tblitem
WHERE tblacc.rkey = tblreceipt.rkey
AND tblacc.stkey = tblst.stkey
AND tblacc.stkey *= tblrtemp.stkey
AND tblacc.stkey *= tblitem.stkey
AND tblacc.itkey *= tblitem.itkey
AND tblrtemp.rkey =* tblreceipt.rkey

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-04-25 : 17:12:30
You just need to change this to JOIN syntax. For "=", use INNER JOIN or just JOIN. For "*=", use LEFT OUTER JOIN or just LEFT JOIN. For "=*", use RIGHT OUTER JOIN or just RIGHT JOIN. Or better yet, don't use RIGHT JOINs, instead rewrite it to be LEFT JOIN for clarity.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -