Solved

Code Help wih Joins

Posted on 2012-04-06
3
304 Views
Last Modified: 2012-04-09
Hi - I am struggling with trying to get this join to work as it should.

I am attaching the code and the files needed to reproduce it.

I am trying to match up for every entry of diff.compr_fld_nm and bring in the fn.g_field_name for it.

Also trying to match up every entry of test_SCN1_id and bring in the ship_ID for it as well.  

All I am getting is duplicates.
TEST.zip
0
Comment
Question by:j2911
  • 2
3 Comments
 

Author Comment

by:j2911
Comment Utility
The code I have is working except for the join part.
0
 
LVL 30

Accepted Solution

by:
hnasr earned 500 total points
Comment Utility
This question requires much time to recreate the problem.
Try to limit the number of tables, and fields in each table.
Check the simplified query then add more fields and tables.

In your current query you are only joining two tables that are used as one entity joined with other table without specifying the ON clause. The data is filtered using the where clause. This creates duplicate records and most are insignificant.

Try to use joins.

You can list the contents of few tables (3-4) with few records (~4 in each) and list the expected output.
0
 

Author Comment

by:j2911
Comment Utility
Although I appreciate your help - I don't do well learning with theory but something I can see.  Would someone have the time to help me out here?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

762 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

12 Experts available now in Live!

Get 1:1 Help Now