Qlik Community

QlikView Documents

Documents for QlikView related information.

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.

Replace characters with Ascii numbers in a string

MVP
MVP

Replace characters with Ascii numbers in a string

Hi,

The below code helps in replacing characters with ASCII codes in a string in Load script

For example

ABC is converted to 656667- since ASCII code of A is 65, B is 66 and C is 67.

CharMap:

Mapping LOAD

Chr(RecNo() - 1) AS Char,

RecNo() - 1 AS Asciicode

AutoGenerate 256;

Data:

LOAD

Text,

MapSubString('CharMap', Text) as formattedText

FROM DataSource;

Hope this helps.

Regards,

Jagan.

Comments
richho_microp
New Contributor III

You life saver, works perfectly.

Thank you

prasadcm
Contributor II

Hey,

Thanks.Worked perfectly for a certain issue.

Version history
Revision #:
1 of 1
Last update:
‎08-26-2014 05:06 AM
Updated by: