Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
I Have a scenario like this:
Example
Name
Team Member (10000)
Team leader (20000)
Ass Manager (40000)
Manager (60000)
Consultant (120000)
Associate Consultant (1300000)
Senior Consultant (60080)
I want Out put like this;
Name Code
Team Member (10000)
Team leader (20000)
Ass Manager (40000)
Manager (60000)
Consultant (120000)
Associate Consultant (1300000)
Senior Consultant (60080)
Could you please suggest me.Thanks in Adv.
Regards,
YADAVSLN.
load Left(Name,Index(Name,'(')-1) as Name,mid(Name,Index(Name,'(')) as Code Inline [ Name Team Member (10000) Team leader (20000) Ass Manager (40000) Manager (60000) Consultant (120000) Associate Consultant (1300000) Senior Consultant (60080) ];
Another solution: if you only have one '(' for row, you can use the subfield funtion
Names: Load * inline [ Name Team Member (10000) Team leader (20000) Ass Manager (40000) Manager (60000) Consultant (120000) Associate Consultant (1300000) Senior Consultant (60080) ]; [2Cols]: Load subfield(Name,'(', 1) as Name, '(' & subfield(Name,'(', 2) as Code Resident Names; DROP Table Names;
Did you know that you can subfield from the RHS of the string as well?
Table: LOAD trim(left(Name, len(code))) as Name, Code; LOAD Name, SubField(Name, ' ', -1) as Code Inline [ Name ...