Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All, I have two tables :
product | productcode |
bulb | 58 |
radio | 100 |
printer | 37 |
computer | 33 |
oldproductcode | new product code |
58 | AH67 |
100 | LK22 |
37 | CY13 |
44 | OL09 |
33 | PE55 |
I want to replace the product code with the new product code from 2nd table.
plz suggest.
Try this
MappingTable:
Mapping
LOAD * INLINE [
oldproductcode, new product code
58, AH67
100, LK22
37, CY13
44, OL09
33, PE55
];
Fact:
LOAD *,
ApplyMap('MappingTable', productcode, 'N/A') as New_Product_Code;
LOAD * INLINE [
product, productcode
bulb, 58
radio, 100
printer, 37
computer, 33
];
Try this
MappingTable:
Mapping
LOAD * INLINE [
oldproductcode, new product code
58, AH67
100, LK22
37, CY13
44, OL09
33, PE55
];
Fact:
LOAD *,
ApplyMap('MappingTable', productcode, 'N/A') as New_Product_Code;
LOAD * INLINE [
product, productcode
bulb, 58
radio, 100
printer, 37
computer, 33
];
The idea is similar to the idea provided here:
Do you have this new field values in any table let me know.
oldproductcode | new product code |
58 | AH67 |
100 | LK22 |
37 | CY13 |
44 | OL09 |
33 | PE55 |