• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

Code Help wih Joins

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
j2911
Asked:
j2911
  • 2
1 Solution
 
j2911Author Commented:
The code I have is working except for the join part.
0
 
hnasrCommented:
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
 
j2911Author Commented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now