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

  • Home
  • SEARCH
  • 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 3281704
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:50:42+00:00 2026-05-17T19:50:42+00:00

I have two tables (A and G) in an Oracle database that can be

  • 0

I have two tables (A and G) in an Oracle database that can be joined together based off an account number. The one caveat to this is that one of the tables (G) has about 80 fewer records than the other. When I query the two tables together, I need to get all of the rows, so that we see NULL data in the columns for the missing 80 rows.

I currently have an Oracle statement that performs a left outer join query using the following “legacy” syntax:

SELECT A.AccountNo,
       A.ParcelNo,
       A.LocalNo,
       A.PrimaryUseCode, 
       A.DefaultTaxDistrict,
       RTRIM(G.Section),
       RTRIM(G.Township),
       RTRIM(g.Range)

  FROM tblAcct A, tblAcctLegalLocation G

 WHERE A.verstart <= '20100917999' AND A.verend > '20100917999' AND A.DefaultTaxDistrict = '2291' 
       AND (SUBSTR(A.AccountNo,1,1) = 'R' or SUBSTR(A.AccountNo,1,1)= 'I') 
       AND SUBSTR(a.ParcelNo,1,1)<> '7' and substr(a.ParcelNo,1,1)<>'8'
       AND A.AcctStatusCode IN ('A', 'T', 'E') 
       AND A.AccountNo = G.AccountNo(+)
       AND G.verstart(+) <= '20100917999' and G.verend(+) > '20100917999'
ORDER BY A.ParcelNo, A.LocalNo

I’m trying to convert this query into a “standard” LEFT JOIN type query since I’m told the newer versions of Oracle support this syntax. I’ve tried the basic

LEFT OUTER JOIN ON A.AccountNo = G.AccountNo 

but this doesn’t seem to work. My queries wind up returning 80 rows fewer than the full amount.

Can anybody tell me what I’m missing or how to format the query properly?

  • 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-05-17T19:50:43+00:00Added an answer on May 17, 2026 at 7:50 pm

    Use:

      SELECT a.AccountNo,
             a.ParcelNo,
             a.LocalNo,
             a.PrimaryUseCode, 
             a.DefaultTaxDistrict,
             TRIM(g.Section),
             TRIM(g.Township),
             TRIM(g.Range)
         FROM tblAcct A
    LEFT JOIN tblAcctLegalLocation g ON g.accountno = a.accountno
                                    AND g.verstart <= '20100917999' 
                                    AND g.verend > '20100917999'
        WHERE a.verstart <= '20100917999' 
          AND a.verend > '20100917999' 
          AND a.DefaultTaxDistrict = '2291' 
          AND SUBSTR(a.AccountNo,1,1) IN ('R', 'I') 
          AND SUBSTR(a.ParcelNo,1,1) NOT IN ('7', '8')
          AND a.AcctStatusCode IN ('A', 'T', 'E') 
     ORDER BY a.ParcelNo, a.LocalNo
    

    Everything you see marked with the (+) must be included in the OUTER join criteria. In an outer JOIN, the criteria is applied before the join.

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

Sidebar

Related Questions

I have two very large enterprise tables in an Oracle 10g database. One table
So i'm having this problem. I have two tables (Oracle), one is called Destination
I have four DB tables in an Oracle database that need to be rewritten/refreshed
I am working with an Oracle 10g Database. I have the following two tables:
I have a query that joins two tables. One table has a column that
I have two columns(column1, column2) in my oracle database table named as demo .
I have two tables one with ID and NAME table 1 ID | NAME
I have a schema in an Oracle 11g R2 database that I'm trying to
We have a product using Oracle, with about 5000 objects in the database (tables
I have a program that connects to an Oracle database and performs operations on

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.