Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

parsing out data identifiers

Hi, I have a field in one table structured like this (text is variable length-could be longer characters) :

123-text

2134-text

567-text

but I need the result to look like this:

TEXT_123

TEXT_2134

TEXT_567

So, the text is 1. capitalized, and that the 2. separator is an underscore and not a dash and also that the 3. text comes before the number portion. The identifier will always be a dash in the field that needs manipulation.

Thanks for your help,

M

1 Solution

Accepted Solutions
sunny_talwar

Here is a sample script

Table:

LOAD Upper(SubField(FieldName, '-', 2)) & '_' & SubField(FieldName, '-', 1) as FieldName;

LOAD * Inline [

FieldName

123-text

2134-text

567-text

];

Capture.PNG

View solution in original post

2 Replies
sunny_talwar

May be try this

Upper(SubField(FieldName, '-', 2)) & '_' & SubField(FieldName, '-', 1) as FieldName

sunny_talwar

Here is a sample script

Table:

LOAD Upper(SubField(FieldName, '-', 2)) & '_' & SubField(FieldName, '-', 1) as FieldName;

LOAD * Inline [

FieldName

123-text

2134-text

567-text

];

Capture.PNG