3 key fields, but if we take into consideration more fields - it is not truth, records are not the same. There are duplicated records if we look at i.e. Maybe first message was to quick or maybe I didn't described it properly. Re: RE: CPYF/SQL INSERT problem - Duplicate Key However,if several changes were made to the same menu record in F0082, this could result in several records in my output file with the same key value, so I created a work file for my output that had the same exact record layout as F0082, but I took the UNIQUE keyword away to allow multiple records for a given menu.Īs Colin said, you need to better analyze what you are trying to accomplish before posting.this is really not a JDE-specific question.īy the way, if you don't care about the duplicates, CPYF will ignore the duplicate key errors (but it still won't copy the duplicates to the target file) by specifying ERRLVL(*NOMAX). We were analyzing changes to the menu master file (F0082), but the menu master is keyed uniquely on the menu name (MNMNI). I have created a process that allows me to copy data from an AS/400 journal back into a physical file to allow easier examination of WHO changed the data in the physical file. The iSeries file manager will NOT allow you to create duplicate records in the TO-file if the keys are specified as being UNIQUE. It is obvious from your posting that the file you are copying FROM is keyed differently from the file that you are copying TO. The rest - uncopied records - are with duplicated keys.Īnd the question is: how to copy this duplicated records? When I try use cpyf some records are copied not everything. I need to copy some records form one to other file and using SQL INSERT operations I get an error:SQL0803 - Duplicate Key Errors. JDELIST is not affiliated with JDEdwards(r). The instructions on how to unsubscribe from any JDELIST mailing list are Subject: RE: CPYF/SQL INSERT problem - Duplicate KeyĬolin Hugill (Consultant) (World A7.3 cum12) Sometimes we create a logical with additional keys to "eliminate"Ĭolin's post has useful information to keep in mind also.įrom: Colin_Hugill ] To run into a situation where we would want duplicate records. Is analyze the tables and figure out what we want to accomplish. We use the Insert (SQL) and CPYF commands quite a bit. This list isĪbout JDE World software - you might help yourself by letting us know IBM Commands and Basic Analysis, you should use them. I am sure there are several organizations that offer in depth courses on Has already been copied in an earlier attempt and therefore shouldn't beĬopied again! Maybe you should clear the target file and start again. Haven't done enough analysis yet or maybe what you are trying to copy Key" errors? The message is trying to tell YOU something. Why would you want to copy records that cause "duplicate Joblog to find the record causing the error, if you look properly. There is enough information in the detailed The remaining (in your terminology "uncopied") records may, OR MAY NOT,Ĭause duplicated keys. Probably not, because the copy normally stops at the error record - so "thorough" and "careful") the joblog when you tried the CPYF command? Did you carefully and thoroughly review (emphasis on Hmmmnnn, SKOREK where did you study computer analysis?
0 Comments
Leave a Reply. |