Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have a table containing three fields STUDENT, TYPE and MARKS.
I need to split Column TYPE in to two columns i.e.. SUBJECT and EX_TYPE
SUBJECT column will contain PAPER-I, PAPER-II, PAPER-III and so on.
EX_TYPE column will contain INTERNAL, EXTERNAL, PRACTICAL etc.
Can any one help me out of this problem.
Regards
Priyanka
should like something like this in load script:
LOAD
Student,
Marks,
Subfield(Type, ' ', 1) as Subject,
Subfield(Type, ' ', 2) as Ex_Type
FROM ...
Best regards,
Patrick
should like something like this in load script:
LOAD
Student,
Marks,
Subfield(Type, ' ', 1) as Subject,
Subfield(Type, ' ', 2) as Ex_Type
FROM ...
Best regards,
Patrick
You can use a subfield function in your script if the two columns are going to be separated by space.
subfield(Type,' ',1) as SUBJECT,
subfield(Type,' ',2) as EX_TYPE
Suggest to use SUBFIELD with three params:
SUBFIELD(Type, ' ', 1) AS Subject,
SUBFIELD(Type, ' ', 2) AS ExType
edit: messages crossed - sorry, apostroph removed
HTH Peter
Thanks a lot Patrick