Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a customer table and for some records I want to update the value with that from a second table:
Table1
cust-code active name
A001 Y Joe
A002 N Pete
A003 Y Bill
A004 Y Mary
A005 Y Lucy
Table2
cust-code active
A001 N
A005 N
I want to finish with:
Table3
cust-code active name
A001 N Joe
A002 N Pete
A003 Y Bill
A004 Y Mary
A005 N Lucy
Thanks for any help you can offer
May be try this with Mapping Load
MappingTable:
Mapping
LOAD * INLINE [
cust-code, active
A001, N
A005, N
];
Table:
LOAD [cust-code],
ApplyMap('MappingTable', [cust-code], active) as active,
name;
LOAD * INLINE [
cust-code, active, name
A001, Y, Joe
A002, N, Pete
A003, Y, Bill
A004, Y, Mary
A005, Y, Lucy
];
Where your Database stored??
May be try this with Mapping Load
MappingTable:
Mapping
LOAD * INLINE [
cust-code, active
A001, N
A005, N
];
Table:
LOAD [cust-code],
ApplyMap('MappingTable', [cust-code], active) as active,
name;
LOAD * INLINE [
cust-code, active, name
A001, Y, Joe
A002, N, Pete
A003, Y, Bill
A004, Y, Mary
A005, Y, Lucy
];