Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join Logical - How To Prevent Duplicate Records

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
Hi,

I'm joining 3 physical files.

Files 1 and 2 have 1-to-1 data There is only 1 rec in File 2 for the matching rec in File 1.

But File 3 is Order Detail - so it can have multiple records for an Order Number.

The Join view I've created contains duplicate records.

For example Order # 1 requires a qty of 84 for Model A
and a qty of 42 for Model B....

but the join file contains 4 records for this order:
84, 42, 84, 42



I've tried rearranging the order of the files on the JFILE and JFLD specs.... always get duplicate recs in the view.

Tried the UNIQUE keyword, but with no luck.

Any ideas?

Thanks, John



 
In your join file, are you using the keyword JDFTVAL?

RedMage1967
IBM Certifed - RPG IV Progammer
 
RedMage1967,

"In your join file, are you using the keyword JDFTVAL? "

yes. Is that causing the dup recs?

I'll remove it tomorrow when I get to the office.
Thanks for the suggestion. John
 
It's been a while since I've used join files. I do believe there is a keyword called JDUPSEQ. Might want to check that keyword out as well.

RedMage1967
IBM Certifed - RPG IV Progammer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top