Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am loading the data from fixed text file and below is the code, which is working fine.
LOAD [@1:2] as [Codigo Banco],
[@11:25] as [Policy Number],
[@44:52] as [Monto de cobro],
[@55:62] as [Fecha de envio],
[@63:70] as [Fecha de cargo]
FROM
[..\Raw Data1\CBC_01042017.txt]
(fix, codepage is 1252);
I have a row at the end in the file which indicates the total value of the data. I wanted to delete that particular row while loading the source data. I have used enable transformation step and below code has been generated
'
(txt, codepage is 1252, no labels, delimiter is ' ', msq, no eof, filters(
Remove(Row, RowCnd(CellValue, 1, StrCnd(contain, 'T')))
));'
Since I am using the Fixed file I have removed the txt with fix (as I was using earlier), now my code looks like below and it is throwing error.
LOAD [@1:2] as [Codigo Banco],
[@11:25] as [Policy Number],
[@44:52] as [Monto de cobro],
[@55:62] as [Fecha de envio],
[@63:70] as [Fecha de cargo]
FROM
[..\Raw Data1\CBC_01042017.txt]
(fix, codepage is 1252, no labels, delimiter is ' ', msq, no eof, filters(
Remove(Row, RowCnd(CellValue, 1, StrCnd(contain, 'T')))
));
attaching the sample raw data
I think I would try something like this:
LOAD * where not wildmatch([Policy Number], '*T*');
LOAD [@1:2] as [Codigo Banco],
[@11:25] as [Policy Number],
[@44:52] as [Monto de cobro],
[@55:62] as [Fecha de envio],
[@63:70] as [Fecha de cargo]
FROM
[..\Raw Data1\CBC_01042017.txt]
(fix, codepage is 1252);
- Marcus
I think I would try something like this:
LOAD * where not wildmatch([Policy Number], '*T*');
LOAD [@1:2] as [Codigo Banco],
[@11:25] as [Policy Number],
[@44:52] as [Monto de cobro],
[@55:62] as [Fecha de envio],
[@63:70] as [Fecha de cargo]
FROM
[..\Raw Data1\CBC_01042017.txt]
(fix, codepage is 1252);
- Marcus
Hey Marcus,
Thanks for your quick reply. It works for me!!!!!!