Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
i believe what you really need is to concatenate both sets of data.
try this:
table1:
LOAD field1 FROM...
table2:
LOAD field1 as field2 FROM...
Concatenate
LOAD field1 as field2
Resident table1
Where not Exists(field2, field1);
You'll get in table2 the full set of values.
Hope this helps.
I keep getting this error: Table not found
Concatenate
LOAD
%KEY_SDMATNR as %KEY_SDMATNR1
Resident BillingDocs
Where not Exists(%KEY_SDMATNR1, %KEY_SDMATNR); My script is
BillingDocs1:
Load Distinct
%KEY_SDMATNR
Resident PASD;
BillingDocs2:
Load Distinct
%KEY_SDMATNR as %KEY_SDMATNR1
Resident KNOP;
Concatenate
LOAD
%KEY_SDMATNR as %KEY_SDMATNR1
Resident BillingDocs
Where not Exists(%KEY_SDMATNR1, %KEY_SDMATNR);
Thoughts?
In the last part, try to rename BillingDocs to BillingDocs1 as it is declared in the beginning of your script.
Thanks I figured out the issue, but based on my previous code I now need to concatenate table1 with 4 fields and table 2 with 4 fields and I have yet to be sucessful. The fields all called the same in each table, and I want to add the records from table 2 to table 1 that are not already in table 1. I have tried a couple of things and I'm just missing something. Can you send me the script example? Thanks again, Sean
QUALIFY *;
table2:
LOAD Field1 & '|' & Field2 & '|' & Field3 & '|' & Field4 as KeyField,
Field1,
Field2,
Field3,
Field4
FROM ...
;
table1:
LOAD Field1 & '|' & Field2 & '|' & Field3 & '|' & Field4 as KeyField,
Field1,
Field2,
Field3,
Field4
FROM ...
;
UNQUALIFY *;
Concatenate
LOAD table2.KeyField as table1.KeyField,
table2.Field1 as table1.Field1,
table2.Field2 as table1.Field2,
table2.Field3 as table1.Field3,
table2.Field4 as table1.Field4
Resident table2
Where not Exists(table1.KeyField,table2.KeyField);
table2:
LOAD Field1 & '|' & Field2 & '|' & Field3 & '|' & Field4 as KeyField2,
Field1,
Field2,
Field3,
Field4
FROM ...
;
table1:
LOAD Field1 & '|' & Field2 & '|' & Field3 & '|' & Field4 as KeyField,
Field1,
Field2,
Field3,
Field4
FROM ...
;
Concatenate
LOAD KeyField2 as KeyField,
Field1,
Field2,
Field3,
Field4
Resident table2
Where not Exists(KeyField, KeyField2);
DROP Table table2;
YES! Thank you very much!!