Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
muniyandi
Creator III
Creator III

how to split the data into new record

Hi Team,

i have source table record like this

Source Records
"AA"-"AB"-"CC"-"DD"
"AM"-"AD"
"AH"-"AN"-"BL"

I need to load the data below mentioned format.

Expected Result
AA

AB

CC
DD
AM
AD
AH
AN
BL
1 Solution

Accepted Solutions
Kushal_Chawda

try this

Subfield(keepchar(Field,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-'),'-') as Result

View solution in original post

5 Replies
sunny_talwar

May be try this:

PurgeChar(SubField(Source, '-'), Chr(34)) as Expected

sunny_talwar

For your sample:

Table:

LOAD *,

  PurgeChar(SubField([Source Records], '-'), Chr(34)) as Expected;

LOAD * INLINE [

    Source Records

    '"AA"-"AB"-"CC"-"DD"'

    '"AM"-"AD"'

    '"AH"-"AN"-"BL"'

];

Capture.PNG

muniyandi
Creator III
Creator III
Author

Thanks Sunny T

Some data have number also

"AH#2"-"AN#6"-"BL#8"



sunny_talwar

Would this be the output you would want to see?

Capture.PNG

Still using the same script:

Table:

LOAD *,

PurgeChar(SubField([Source Records], '-'), Chr(34)) as Expected;

LOAD * INLINE [

    Source Records

    '"AA"-"AB"-"CC"-"DD"'

    '"AM"-"AD"'

    '"AH"-"AN"-"BL"'

    '"AH#2"-"AN#6"-"BL#8"'

];

Kushal_Chawda

try this

Subfield(keepchar(Field,'ABCDEFGHIJKLMNOPQRSTUVWXYZ-'),'-') as Result

View solution in original post