Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load multiple line into a variable

Hi Experts,

I need to load a multiple line from text and store it into a single variable, can someone please help me on the same?

Below is the scenario:

I have a text file in the system with the name sample.txt with below data.

Sample.txt

ABCDEF

GEFG

JSDFR

Now i need to load the file in the qlikview and store all 3 line in a single varaible

vData = 'ABCDEF

             GEFG

             JSDFR'

Please guide me on how to achieve this?

14 Replies
MK_QSL
MVP
MVP

Table:

     LOAD *, RowNo() as ID

Inline

[

FieldName

ABCDEF

GEFG

JSDFR

];

Temp:

LOAD Concat(FieldName, Chr(13), ID) as Concat

Resident Table;

LET vData = Peek('Concat');

DROP Table Temp;

MayilVahanan

hi

Try like this

Table:

LOAD @1 as FieldName,

AutoNumber(@1) as FieldNo,

RowNo() as RowNo

FROM

(txt, codepage is 1252, no labels, delimiter is ',fdgfdfd', msq);

Temp:

LOAD Concat(I, Chr(13), RowNo) as Concat

Resident Table;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
sunny_talwar

The indentation won't be the same, but you can get all of it here: PFA

qlikviewwizard
Master II
Master II

MRKachhiaIMP

What is Carriage Return?