Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

qliklizzy
Contributor

load from text file delimiter #

Hi

Could anyone help with importing a text file into QV please?

I have attached a text file I need uploading but it doesn't find the file.

I copied the logic script from another app I have which uses the | delimiter - so I just changed that to # hoping it would work but it still doesn't?

from
\\mtechdown\MTECHDOWN\Medrec\CancelledOPS_daily
  (
txt, codepage is 1252, embedded labels, delimiter is '|', msq) 

thanks

Liz

1 Solution

Accepted Solutions
prieper
Honored Contributor II

Re: load from text file delimiter #

What errormessage do you get?

try to load without embedded labels, e.g. 'no labels', just to check, whether it works and that the error is no related to the fieldnames.

Peter

7 Replies
ChennaiahNallani
Contributor III

Re: load from text file delimiter #

try like below.

Capture.PNG

LOAD NAME,

     AGE,

     TH,

     DOB,

     [OP DATE],

     [DIFF BETWEEN OP DATE & CANCEL DATE],

     [OP TYPE],

     [UNIT No],

   ..

   ..

FROM

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

MVP
MVP

Re: load from text file delimiter #

The below worked with me:

Untitled.png

FROM

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

prieper
Honored Contributor II

Re: load from text file delimiter #

Hi,

think that you need to choose the separator from the dropdown-menu in the wizard.

Scripting then is OK:

Data:

    LOAD

         NAME,

         AGE,

         TH,

         DOB,

         [OP DATE],

         [DIFF BETWEEN OP DATE & CANCEL DATE],

         [OP TYPE],

         [UNIT No],

         [CANCEL DATE],

         USER,

         [CAN TYPE],

         [CAN TYPE NAME],

         [CAN OP GROUP],

         [OUTCOME TYPE],

         [PT'S CONS],

         SPEC,

         [PROPOSED OP],

         [MAN INTENT],

         [FIN YEAR],

         [ENG/WEL],

         [WAITLIST PRIORITY],

         [WAITLIST PRIORITY MAPS TO],

         [OP CANCEL GROUP],

         [REF SUBSCRIPT]

    FROM

        [test CancelledOPS_daily.TXT]

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

HTH Peter

edit: Just replacing '#' for the '|' should work as well - Just try

LOAD * FROM ....

in order to avoid any misinterpretation in the fieldnames.

Highlighted
qliklizzy
Contributor

Re: load from text file delimiter #

thanks ; I'm still having trouble - I thought I could just switch the | for a #

could it be because I am getting the file from cross server?

it works in my other app though I just changed the filename - so I'm stumped..

thanks

prieper
Honored Contributor II

Re: load from text file delimiter #

What errormessage do you get?

try to load without embedded labels, e.g. 'no labels', just to check, whether it works and that the error is no related to the fieldnames.

Peter

YoussefBelloum
Esteemed Contributor

Re: load from text file delimiter #

Was trying it and just replacing the | with # on the code is not enough..

it looks like you can only create the field delimiter using the graphical part, as explained previously.

as for the symbol on the code, it acts on the lines (not the field name)

qliklizzy
Contributor

Re: load from text file delimiter #

oh my gosh - it was the field name!

thanks

I had PT's CONS not PT'S CONS

grrrr

sorry I should have spotted that!

thanks for all your help