on 04-24-2008 10:23 AM
Hi
I have a flat file like this
column names NO NAME AGE
FLAT FILE IS 1#KIRAN#27
2###28
3#RAVI#28
in the second record the name field is also filled with #
so please tell me how can we handle this
thanks®ards
venkat
Hi Venkat ,
Use .fieldFixedLengths option if lenth is always unique,
If not you have to go for UDF..as i Know.
If you made a specification for .fieldFixedLengths, the length of the separator is not taken into account.
You must specify at least either NameA.fieldFixedLengths or NameA.fieldSeparator.
If you have only specified .fieldSeparator, the structures of the XML document can have differing numbers of elements that are added to each other separately in the text file by the value from .fieldSeparator. If you specify .fieldFixedLengths this is not possible since the number of columns is defined when the column widths are given.
BestRegards,
Ramesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venky ,
I think you have to go for UDF in that calculate the length of characters between first and last "#" and replace all the "#" present in that substring with some other character like "!@!" do the content conversion and then again use another UDF in that replace all "!@!" with "#" and then send the file to required destination .
reward Points if helpful
Thanks
Sunil SIngh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.