I want to concatenate 2 tables, but tddockla_docnr is not unique. So I only want to keep values from the second table if tddockla_docnr from the second table NOT matches tddockla_docnr from the first table.
Code:
TurnoverDocnrMatch: //Invoices
Load
tddockla_docnr,
vereffenddocnr,
tddockla_docsoort,
if(Exists(tddockla_docnr, tddockla_docnr), 1 , 0)
resident TurnoverDocnrRCT;
Concatenate
TurnoverDocnrMatch1: //Credit notes
Load
tddockla_docnr,
vereffenddocnr,
tddockla_docsoort
resident TurnoverDocnrCRN;
//i think a where clause will be needed here ...
And later the TurnoverDocnrMatch table is stored in a .txt file and the table is dropped.
Is there an easy way to accomplish this? Match or Exists maybe?
Thanks!