Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9206761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:14:37+00:00 2026-06-18T00:14:37+00:00

I am trying to understand Oracle join syntax of using (+) to join two

  • 0

I am trying to understand Oracle join syntax of using (+) to join two tables.
Could someon show me how would this query would look if it was converted to use the standard join syntax?

select p1.product_id, p1.product_name, p2.product_code, (decode(p3.product_type, null, 'N/A',p3.product_type) as product_type
from products p1, product_descriptions p2, product_descriptions p3
where p1.product_id=p2.product_id
and p2.product_age=p3.product_age(+)
and p2.product_type=p3.product_type(+)
and p3.status(+)='VALID'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:14:39+00:00Added an answer on June 18, 2026 at 12:14 am

    Something like this:

    select p1.product_id, p1.product_name, p2.product_code,
        (decode(p3.product_type, null, 'N/A', p3.product_type) as product_type
    from products p1
    join product_descriptions p2
        on p1.product_id = p2.product_id
    left join product_descriptions p3
        on p3.product_age = p2.product_age
        and p3.product_type = p2.product_type
        and p3.status = 'VALID';
    

    The where p1.product_id=p2.product_id is a normal inner join between p1 and p2. The others are outer joins; the way it’s written looks like a mix of left and right outer joins, but since and p2.product_age=p3.product_age(+) is the same as and p3.product_age(+)=p2.product_age then it isn’t really; it’s a fairly straightforward left outer join between the product of the p1/p2 join and p3.

    As an aside, I’m not a fan of aliases like p1, p2 and p3 as they are not descriptive, and it’s easy to get lost when you do this in more complicated queries. I’m not alone.

    I’m not sure you even need the outer join, but it rather depends on the data. If product_age and product_type is unique then you could case the p2.status; if it isn’t then you’re probably assuming that only one product_age/product_type row can be VALID, otherwise you’d get duplicates. Just musing about what you’re trying to do…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to enter a SQL query with parameters using the Oracle OLE DB
Trying to understand PNG format. Consider this PNG Image: The Image is taken from
Trying to understand Ruby a bit better, I ran into this code surfing the
Trying to understand the math of this code snippet. A token is provided which
Im trying to understand how class generics work and this bit just doesnt make
Dear SQL Gurus from Stack Overflow: Environment: Oracle I'm trying to understand why I
I am trying to follow this JavaFX 2 guide: http://docs.oracle.com/javafx/2/ui_controls/table-view.htm#CJAGAAEE I use Scala instead
I am trying to retrieve data form an Oracle database using jdbc (ojdbc14.jar). I
I can understand that many years ago there would be this kind of limitation,
I'm trying to understand different ways of getting table data from Oracle stored procedures

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.