on 06-07-2007 12:40 PM
Hi all,
following is my source file -->
UNH000000101ORDERS:D: 96A:UN:EAN008'
I am trying for a UDF which should identify the field separator ( as a variable
my requirement is i want to separate out fields from the input string on the basis of field separator (
ORDERS:D: 96A:UN:EAN008'
i want the output as 4 variables they are ORDERS , D, 96A, EAN008--> these outputs need to be passed to 4 diff fields in target structure.
can u help me in writting this functionality
rgds
chaithanya
define a udf with one string parameter say input...
input will contain the value : <b>UNH000000101ORDERS:D: 96A:UN:EAN008'</b>
inside the UDF you can then use StringTokenizer class and then using nextToken method for 4 times you can capture the four values in four diff variable.
while creating the tokenizer object u can specify that you need to delimit values based on :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.