Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
got a table whose fields are the following:
| TYP |
| NUM |
| CPY |
| FCY |
| JOU |
| FIY |
| PER |
and there is another table that holds the aliases for each column above as follows:
| TYP | Type de pièce |
| NUM | Numéro de pièce |
| CPY | Société |
| FCY | Site |
| JOU | Journal |
| FIY | Exercice |
| PER | Période |
is there a way to give aliases in the load statement without hardcoding; something like
load
TYP as applymap('mappng_table',name) ....
kindly advise
Something like this should work:
Map:
Mapping LOAD * INLINE [
TYP, Type de pièce
NUM, Numéro de pièce
CPY, Société
FCY, Site
JOU, Journal
FIY, Exercice
PER, Période
];
tmp:
Load * Inline [
TYP, NUM, CPY, FCY, JOU, FIY, PER
]; RENAME Fields using Map;
hope this helps
Something like this should work:
Map:
Mapping LOAD * INLINE [
TYP, Type de pièce
NUM, Numéro de pièce
CPY, Société
FCY, Site
JOU, Journal
FIY, Exercice
PER, Période
];
tmp:
Load * Inline [
TYP, NUM, CPY, FCY, JOU, FIY, PER
]; RENAME Fields using Map;
hope this helps
thank you
the RENAME Fields using Map is new to me !!