Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Clever_Anjos
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
rbecher
MVP
MVP

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

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine

View solution in original post

18 Replies
sunny_talwar

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

LOAD * INLINE [ 

    F1, F2 

    ], test 

]; 

Capture.PNG

Clever_Anjos
Employee
Employee
Author

But this does not

LOAD F1, F2 INLINE [

    F1, F2

    "]", test 

];

Clever_Anjos
Employee
Employee
Author

Anyway, one more silly point

sunny_talwar

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

maxgro
MVP
MVP

SET ErrorMode=0;

LOAD F1, F2 INLINE [

    F1, F2

    "]", test

    "]", test

];

SET ErrorMode=1;

1.png

Clever_Anjos
Employee
Employee
Author

maxgro‌, using QV 12

Capturar.PNG

sunny_talwar

That's what I got too....

Somehow this ->

LOAD * INLINE [

    F1, F2

    ], test

];

is also creating issues for script after this load.

sunny_talwar

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

maxgro
MVP
MVP

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