on 07-16-2015 3:33 PM
Hi experts,
I have a requirement to change the value of the strings to column names.
For ex:
ID String_value
1 name=abc;dept=123;grade=A
i want the output result as:
ID Name dept Grade
1 abc 123 A
Please suggest some resolution for this.
Regards,
Jayant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Chetan,
Thanks for a solution,
i will try this out, i was concerned if the number of the values coming in the string_value are not subjected to change in every load.
for ex:
Load 1:
ID String_value
1 name=abc;dept=123;grade=A
Load 2.
ID String_value
1 name=abc;dept=123;grade=A;city=xyz
Load 3:
ID String_value
1 name=abc;dept=123;grade=A;phone=4444555
and so on..
ans also, since the column names are getting harcoded, is there a way to get the column names dynamically from the string_value??
No need to reinvent the wheel. Check out How to split a comma separated String into multiple rows? - Enterprise Information Management - SCN ... for 2 possible solutions. It's not exactly the same use case, that's true, but I am sure it can inspire you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.