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 8246577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:33:03+00:00 2026-06-07T22:33:03+00:00

My question is simple, suppose i am joining between two tables and one of

  • 0

My question is simple, suppose i am joining between two tables and one of them is a right join

select e.name, nvl(e.mobileNumber, c.secondaryNumber)
from T_employee e, t_contact c
where e.fieldOfficeCode = 10
and e.id = c.id (+)
and c.status = 1001

now if I remove the last line of the query it would do the right join correctly, but once the last line is present I will not get any reslut. Any idea on how to resolve this. Now the query at hand is relatively complex and spans 5 tables but the sample snippet will simplify the actual problem

regards,

  • 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-07T22:33:05+00:00Added an answer on June 7, 2026 at 10:33 pm

    This is what you need:

    and c.status (+) = 1001
    

    Or in modern syntax:

    select e.name, nvl(e.mobileNumber, c.secondaryNumber)
    from T_employee e
    left outer join t_contact c
      on e.id = c.id
      and c.status = 1001
    where e.fieldOfficeCode = 10
    

    Your query was turning the outer join back into an inner join by only selecting joined records where c.status= 1001 – which excludes all no-match rows where it is null.

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

Sidebar

Related Questions

My question is kinda simple... Let's suppose I have two simples tables on a
One simple question.. Let's suppose in Matlab we have a variable: numEntries = 8
I have a very simple question. Lets suppose there is C# project name Game
My question is rather simple. Let's suppose I'm executing the algorithm A star (search
You will suppose this is a big question.but there might be a simple problem
Following on from my previous question: Simple inner join in linq How would I
Question is simple: I have two List List<String> columnsOld = DBUtils.GetColumns(db, TableName); List<String> columnsNew
Well simple question here (maybe not a simple answer?) Say I have a two
I have a very simple regex question. Suppose I have 2 conditions: url =
Very simple question: suppose I have the following js/jquery code doSomething(); $.get(url, callback); doSomethingElse();

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.