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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:38:30+00:00 2026-06-16T05:38:30+00:00

Query before transformation SELECT w.tech AS tech, w.wpcddate AS job_date, w.corp AS corp, w.house

  • 0

Query before transformation

SELECT w.tech AS tech,
       w.wpcddate AS job_date,
       w.corp AS corp,
       w.house AS house_number,
       w.cust AS cust_number,
       h.zipcode AS zipcode
  FROM fsm_m_wipmaster w,
       fsm_m_zipmaster z,
       fsm_m_housemaster h,
       fsm_m_custmaster c
 WHERE c.corp(+) = w.corp
   AND c.house(+) = w.house
   AND c.cust(+) = w.cust
   AND h.corp(+) = w.corp
   AND h.house(+) = w.house
   AND h.cust(+) = w.cust
   AND z.corp(+) = w.corp
   AND z.zipbeg IS NULL
   AND h.zipcode IS NOT NULL
   AND w.tech IS NOT NULL
ORDER BY w.corp;

Query After transformation

SELECT w.tech AS tech,
       w.wpcddate AS job_date,
       w.corp AS corp,
       w.house AS house_number,
       w.cust AS cust_number,
       h.zipcode AS zipcode
  FROM fsm_m_housemaster h
       LEFT OUTER JOIN
       fsm_m_custmaster c
      ON h.cust = c.cust
     AND h.corp_seq = c.corp_seq
     AND h.house = c.house
       LEFT OUTER JOIN
       fsm_m_wipmaster w
      ON h.cust = w.cust
     AND h.house = w.house
     AND h.corp_seq = w.corp_seq
       LEFT OUTER JOIN fsm_m_zipmaster z
      ON h.corp_seq = z.corp_seq AND z.zipbeg IS NULL
 WHERE w.tech IS NOT NULL
ORDER BY w.corp;

I seem to break my head as to why the Query After transformation is not returning the same results as query before.
I know i am missing something silly here
Can anyone spot the obvious ?

  • 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-16T05:38:31+00:00Added an answer on June 16, 2026 at 5:38 am

    The original query only consists of a single outer join because the (+) hasn’t been used on all conditions on the relevant tables.

    So the correct rewrite using the newer join syntax is:

    SELECT w.tech AS tech,
        w.wpcddate AS job_date,
        w.corp AS corp,
        w.house AS house_number,
        w.cust AS cust_number,
        h.zipcode as zipcode
    FROM fsm_m_wipmaster w 
    JOIN fsm_m_zipmaster z   ON z.corp = w.corp AND z.zipbeg is null
    JOIN fsm_m_housemaster h ON h.corp = w.corp AND h.house = w.house AND h.cust = w.cust AND h.zipcode is not null
    LEFT OUTER JOIN fsm_m_custmaster c  ON c.corp = w.corp AND c.house = w.house AND c.cust = w.cust
    WHERE w.tech IS NOT NULL
    ORDER BY w.corp;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have used this query before: SELECT * FROM stone_list WHERE type IN ('ALEXANDRITE','AMETHYST')
How do I return the everything in a string from a sql query before
I want to remove an item from the result of a LINQ query before
Following on from my earlier question: Manipulate Lucene query before performing search I've run
The first part of the query before not in runs and gives me a
Is that correct: When I query a value before validation (or if validation failed)
I need to show a popup window before a query execution, show the time
In mongodb adhoc query, before executing the query, how to format the date type
In my query, I use the IIF function to assign either Before or After
why this simple query not working. I know it was OK before I upgraded

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.