Wednesday, March 11, 2015

QV23 keepchar & purgechar in qlikview

replace equivalent in qlikview:

Want to remove unwanted chars from string?
Qlikview provide us very simple function like "keepchar" and "purgechar".

Keepchar - it will return only string, which we want to keep (we need to mention list of char, that we want to keep)
purgechar - it will remove unwanted chars from string (we need to mention list to char, that we dont want to keep)


examples:
=keepchar ( 'j%4in'(fo!','abcdefghijklmnopqrstuvwxyz0123456789' ) returns 'j4info'
=PurgeChar('j%4in'(fo!', '%(!' &chr(39))


*chr(39) - is used for remove single quote from string.

No comments:

Post a Comment

web stats