Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load from textfile with delimited records

Hi,

i need to upload a text file that has a defined record size as detailed below. Is there an automatic way to set the character lenght when uploading a file?

BEGINHEADER

BOARDRLT01 DATA_COMPETENZA=D=8

BOARDRLT02 COD_FB=D=10

BOARDRLT03 TAX_BENEFIT_NEW_VOLONTARIO=N=15

BOARDRLT04 LIFE_FUND_PAC_INI=N=15

BOARDRLT05 ADEGUAMENTO=N=15

BOARDRLT06 ALTERNATIVE_PAC_INI=N=15

BOARDRLT07 LIFE_SERENITY=N=15

BOARDRLT08 PREMIUM_PLAN_PAC_INI=N=15

BOARDRLT09 CAPITAL_NEW_EP_MYP_PAC_INI=N=15

BOARDRLT10 FONDI_PAC_INI=N=15

BOARDRLT11 TOTALE_PAC_VITA_FONDI=N=15

BOARDRLT12 TAX_BENEFIT_NEW_TFR=N=15

BOARDRLT13 TAX_BENEFIT_NEW_TRASFERIMENTI=N=15

BOARDRLT14 TAX_BENEFIT_NEW_TFR_STORICI=N=15

BOARDRLT15 CNTR_TAX_BENEFIT_NEW_TFR=N=15

BOARDRLT16 LIFE_FUND_PIC=N=15

BOARDRLT17 SINERGY=N=15

ENDHEADER

5 Replies
Not applicable
Author

Hi,

Like this

Load @1:12 as Filed1,

        @13:28 as field2

   -------

----

from emp.txt;

here 1-12 fixed width is first field and 13 to 28 has second field like that you need to do the fixing between the fields while loading

Anonymous
Not applicable
Author

I know how to do that, i was hoping there is a tool that does that in automatic with some simple inputs.

Not applicable
Author

Hi,

I don't know which tool is use for this can be do it automatically.

MarcoWedel

you could try to use blanks as a delimiters instead of fixed length records.

As far as I can see, there are no blanks in the second field (the part after BOARDRLTxx).

hope this helps

regards

Marco

MarcoWedel

Hi,

maybe like:

QlikCommunity_Thread_141663_Pic1.JPG.jpg

LOAD @1 as Field1,

     @2 as Field2

FROM [QlikCommunity_Thread_141663.txt] (txt, codepage is 1252, no labels, delimiter is spaces, msq, header is 1 lines)

Where @1<>'ENDHEADER';

hope this helps

regards

Marco