Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklizzy
Creator II
Creator II

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
Master II
Master II

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

View solution in original post

7 Replies
ChennaiahNallani
Creator III
Creator III

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);

tresesco
MVP
MVP

The below worked with me:

Untitled.png

FROM

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

prieper
Master II
Master II

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.

qliklizzy
Creator II
Creator II
Author

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
Master II
Master II

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
Champion
Champion

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
Creator II
Creator II
Author

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