Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Modify data from a table

Hi,

I am loading data from a table and would like to remove the two last characters of the field PRV_CODE. (#0)

These characters is allways in the end of the value, but the length of the PRV_CODE can vary.

Any idea?

PRV_RENTITYPRV_PROPERTYPRV_CODEPRV_NVALUE
PMCFESTTIMER83#05.000000

Best regards
Dag

1 Solution

Accepted Solutions
MVP
MVP

Re: Modify data from a table

Use below in your script instead of PRV_CODE

Replace(PRV_CODE,'#0','') as PRV_CODE

5 Replies
srchilukoori
Valued Contributor

Re: Modify data from a table

if its '#0' always. You can use the Replace function to replace the '#0'  with a '' (blank).

chiru_thota
Valued Contributor

Re: Modify data from a table

you can use

=SubField(PRV_CODE,'#',1)

MVP
MVP

Re: Modify data from a table

Use below in your script instead of PRV_CODE

Replace(PRV_CODE,'#0','') as PRV_CODE

arsal_90
Contributor III

Re: Modify data from a table

Use Purge Char fuction

=purgechar(PRV_CODE,'#0')

Not applicable

Re: Modify data from a table

Thanks for all answers.
The code worked fine :-)

Community Browser