Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
iam loadind data from a .dat file ad because of this the format of the data i get is not the optimum.
i use the text( field) commnad to "normalize" the text data. i want to use a n applymap command to a field like the one i mentioned above. more precicely this is my code:
[Transaction Type Description]:
Mapping LOAD
//load
Text(Code) as [Transactions Type],
Text(Description) as [Transaction Type Description]
FROM
[$(vExcelDataDir)Transaction Type.xlsx]
(ooxml, embedded labels, table is [Transaction Type]);
it is an excel file that contains values ( 10,11,12,13,14,15 ....99) for the Code field and a string for the Description.
the table i want to apply the map is like this:
Transcactions:
LOAD
@1:11 as [Transcactions.Name],
Text(@11:12) as [Transactions Type],
applymap ( '[Transaction Type Descriptions]', @11:12 , '-' ) AS [Transaction Type Description]
FROM
[$(vLiveDataPath)TEST-TRX-FILE.TXT]
(fix, codepage is 1253, header is 1 lines);
When i run the code i get an empty field for the [Transaction Type Description] .
Any help would be very appreciated!
Thank you.
Hi!
You can not use the '[ ]' ...
applymap ('Tipo Transação Descrições', @ 11:12, '-') AS [Descrição Tipo de Transação]
[Tab 1]:
Mapping
LOAD * Inline
[x, y
1, 10
2, 20
3, 30
4, 40
5, 50
];
[Tab 2]:
LOAD ApplyMap('Tab 1', RecNo(), '-') as Y
AutoGenerate(10);
I hope that solves your problem.
what if you put the text function in the applymap as well :
applymap ( '[Transaction Type Descriptions]', Text(@11:12) , '-' ) AS [Transaction Type Description]
or maybe do the applymap in a subsequent load above this load.
I've already tried both of your suggestions earlier before posting this but they did not work. I am trying to find other ways to solve this..
maybe a sample application would help, if possible.
Hi!
You can not use the '[ ]' ...
applymap ('Tipo Transação Descrições', @ 11:12, '-') AS [Descrição Tipo de Transação]
[Tab 1]:
Mapping
LOAD * Inline
[x, y
1, 10
2, 20
3, 30
4, 40
5, 50
];
[Tab 2]:
LOAD ApplyMap('Tab 1', RecNo(), '-') as Y
AutoGenerate(10);
I hope that solves your problem.