Solved

SQL Where statement - column_name(+)

Posted on 2013-01-07
5
450 Views
Last Modified: 2013-01-07
I have inherited some old code and am wondering why the (+) was coded in this statement, as I have never seen it used before, and can find no reference to it on the internet.

WHERE        c.CASE_NUMBER = cz.CASE_NUMBER(+)

Thanks
0
Comment
Question by:ktylerconk
  • 2
  • 2
5 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
It is the old OUTER JOIN Oracle syntax.
0
 
LVL 45

Accepted Solution

by:
Kdo earned 25 total points
Comment Utility
Hi tyler,

That's a legacy style of coding an outer join.

In the early days of SQL there were only inner joins.  When outer joins were added, Oracle adopted the (+) syntax to describe that the table is being outer joined.  (I've never cared for the syntax.)

As far as I know, it's not supported by any other vendor, and is deprecated by Oracle.  The Oracle SQL parser still accepts the syntax, but you shouldn't use it to code new SQL projects.


Good Luck,
Kent
0
 

Author Closing Comment

by:ktylerconk
Comment Utility
Thank you Kent!!
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
Here is the doc link that talks about it:

http://docs.oracle.com/cd/E11882_01/server.112/e26088/queries006.htm#SQLRF52354

I'm on fence with Kdo's post.  I've been Oracle and only Oracle for so long, I've still not quite mastered the ANSI join syntax and find it confusing (but I also haven't taken the time to figure it out).
0
 

Author Comment

by:ktylerconk
Comment Utility
Thank you for the great article slightwv!  It should help me!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now