Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

saradhi_it
Contributor

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
ggallina
Contributor III

Re: How to clear Delimiters and arrange the data( Urgent)

Hi,

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

Regards.

MVP
MVP

Re: How to clear Delimiters and arrange the data( Urgent)

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
Honored Contributor III

Re: How to clear Delimiters and arrange the data( Urgent)

Please post your data file

MVP
MVP

Re: How to clear Delimiters and arrange the data( Urgent)

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
Contributor

Re: How to clear Delimiters and arrange the data( Urgent)

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

Community Browser