Discussion Board for collaboration on QlikView Scripting.
NEED help for following:-
My data is in alphanumeric format as shown in attached image below i need to extract only numeric part :-
from Qlik inline help
KeepChar(s1 , s2)
Returns the string s1 less all characters not contained in string s2.
keepchar ( 'a1b2c3','123' ) returns '123'
Returns the string s1 less all characters contained in string s2.
purgechar ( 'a1b2c3','123' ) returns 'abc'
but how cani specify second part data is different in all rows
Use KeepChar(FieldName) as Field_Name
This should work
use purgechar(Fieldname) as String_Data
use keepchar(Fieldname) as Numeric_Data
so you will get the values in 2 different fields
KeepChar(SAP_CODE,'0123456789') as SAP_CODE
yup it worked,,Thanx
Can you close this thread by selecting appropriate answers.
Use the following script to keep only numeric data:-
LOAD * INLINE [ A 12s 234f];store S into S.qvd;drop Table S;
d:LOAD PurgeChar(A,'sf') as AFROMS.qvd(qvd);Thanks & Regards
KeepChar(yourfield , '0123456789') as newfield