Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
saradhi_it
Creator II
Creator II

How to clear Delimiters and arrange the data( Urgent)

Hi

i got requirement which the data in text file with delimiters(:,|) i removed in Delimiter and using subfield but i am not desired output

i attached the code and required output file image

Regards

pardhu

5 Replies
Anonymous
Not applicable

Hi,

I'm not sure that I understand all but you can begin with this, I hope this can help you.

Regards.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this script

Temp:

LOAD @1 as id,

     @2 as product,

     @3 as productwithprice

FROM

[my script .txt]

(txt, codepage is 1252, no labels, delimiter is ':', msq, header is 2 lines);

Product:

LOAD

id,

SubField(product, '|') AS Product

RESIDENT Temp;

Product:

LOAD

id,

SubField(productwithprice, '|') AS Productwithprice

RESIDENT Temp;

DROP TABLE Temp;

Hope this helps you.

Regards,

Jagan.

sasiparupudi1
Master III
Master III

Please post your data file

jonathandienst
Partner - Champion III
Partner - Champion III

I think you can achieve the same result in a a single step:

LOAD

     Id,

     SubField(product,'|' ) as product,

     SubField(productWithPrice,'|' ) as productWithPrice

FROM

(txt, codepage is 1252, embedded labels, delimiter is ':', msq);

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
saradhi_it
Creator II
Creator II
Author

Hi jagan,

i did like this but in the end  if i am taking a table box i can see some repeated data in the productwithprice table

so the result is mismatching ....

Regards

Pardhu