Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
I know how to do that, i was hoping there is a tool that does that in automatic with some simple inputs.
Hi,
I don't know which tool is use for this can be do it automatically.
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
Hi,
maybe like:
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