Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
If I have a list of supplier numbers and a list of customer numbers how can I create a key field which combines the two for every combination?
eg
Supplier
123
456
789
Customer
987
654
321
results in a table like this
CustSupp
987-123
987-456
987-789
654-123
654-456
654-789
321-123
321-456
321-789
Thanks
Join the 2 sets of data then the rusult will be a table with 2 fields, reload it with a third field doing:
Load Field1 & '-' Field2 resident Table;
If this is only for a key you should use this from Alexandros17 suggested field-joining within an autonumber:
Load *, autonumber(Field1 & '-' Field2) as Key resident Table;
- Marcus
Try
Supplier&'-'&Customer as CustSupp
Supplier:
load * inline [
Supp
123
456
789
];
Customer:
load * inline [
Cust
987
654
321
];
TmpCustSupp:
NoConcatenate load Supp Resident Supplier;
join (TmpCustSupp) load Cust Resident Customer;
CustSupp:
load
*,
Cust & '-' & Supp as CustSupp
Resident TmpCustSupp;
DROP Table TmpCustSupp;