Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Employee
Employee

Square Brackets [] inside an Inline Load

I´d like to know why a simple script like that causes an error

LOAD * INLINE [

    F1, F2

    "", test

];

I know I can  do this

LOAD Replace(Replace(F1,'{','['),'}',']') as F1, F2 INLINE [

    F1, F2

    "{a}", test

];

I´d like to know if there´s an easier way of doing this.

1 Solution

Accepted Solutions
MVP
MVP

Re: Square Brackets [] inside an Inline Load

Hi all,

there is another more simple solution with quotes (esp. if you want to paste lots of data from wherever):

LOAD * INLINE "

    F1, F2

    , test

";

- Ralf

18 Replies

Re: Square Brackets [] inside an Inline Load

Don't know why, but this seems to work:

LOAD * INLINE [ 

    F1, F2 

    ], test 

]; 

Capture.PNG

Employee
Employee

Re: Square Brackets [] inside an Inline Load

But this does not

LOAD F1, F2 INLINE [

    F1, F2

    "]", test 

];

Employee
Employee

Re: Square Brackets [] inside an Inline Load

Anyway, one more silly point

Re: Square Brackets [] inside an Inline Load

This worked because two square brackets formed escape sequence: Escape sequences

MVP
MVP

Re: Square Brackets [] inside an Inline Load

SET ErrorMode=0;

LOAD F1, F2 INLINE [

    F1, F2

    "]", test

    "]", test

];

SET ErrorMode=1;

1.png

Employee
Employee

Re: Square Brackets [] inside an Inline Load

maxgro‌, using QV 12

Capturar.PNG

Re: Square Brackets [] inside an Inline Load

That's what I got too....

Somehow this ->

LOAD * INLINE [

    F1, F2

    ], test

];

is also creating issues for script after this load.

Re: Square Brackets [] inside an Inline Load

Oh well, although the script editor doesn't understand it, the script still runs without issue:

LOAD * INLINE [

    F1, F2

    ], test

];

Table:

LOAD * Inline [

Field

a

b

c

];

Capture.PNG

MVP
MVP

Re: Square Brackets [] inside an Inline Load

I'm on 11.20. Not a good thing the result is so different 11 vs 12.

Community Browser