SQL old school join *= to New LEFT JOIN also posted in r/learnsql via /r/learnprogramming


SQL old school join *= to New LEFT JOIN also posted in r/learnsql

So I'm going through the 2012 wrox Beginning Developer book. but I'm using SQL 2016 as well as management studio. I'm trying to upload the chaper 4db code but got some issues with compatibility of old ways to do it in SQL. I got message saying I could set it to compatibility to 80 and it will run. But I'd like to know how to set it up. The issue is old school way of right and left join = , = respectively mine is a left join. So how do I update this bit of code to run.

SELECT sso.SpecialOfferID, Description, DiscountPct, ProductID FROM Sales.SpecialOffer AS sso, Sales.SpecialOfferProduct AS ssop WHERE sso.SpecialOfferID *= ssop.SpecialOfferID AND sso.SpecialOfferID != 1 

Submitted July 18, 2017 at 01:07AM by dude_42
via reddit http://ift.tt/2uxDLZ5

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s