Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way in QlikView to separate two words at the transformation step into two different words as is the case in MS SQL Server.
For example if I have a name Chris Chitemerere, i can separate this into two new derived columns namely, First Name (Chris) and Second Name (Chitemerere).
Is this possible in QV?
Regards.
Chris
I guess the only way I can think of is to use SubField function
SubField(FieldName, ' ', 1) as [First Name],
SubField(FieldName, ' ', 2) as [Last Name],
I guess the only way I can think of is to use SubField function
SubField(FieldName, ' ', 1) as [First Name],
SubField(FieldName, ' ', 2) as [Last Name],
Maybe like
LOAD
Subfield(FULLNAME, ' ',1) as FirstName,
Subfield(FULLNAME, ' ',2) as LastName,
...
or using other string functions, there are a bunch of functions in QV.
THANKS Sunny
Thanks Swuehl
Hi Sunny
What if i have Chris Moore Chitemerere and i want 'Chris More' as FirstandSecondName?
Regards
This script assumes that your first names and last name are separated by spaces, and last name is only consisting of one word:
LOAD *,
Left(FULL, Index(FULL,' ',-1)-1) as FirstSecond,
Subfield(FULL, ' ',-1) as Last;
LOAD * INLINE [
FULL
Chris Moore Chitemerere
Chris Chitemerere
];
Thanks Swuehl