Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

wanyunyang
Contributor

Load multiple SQL queries into data load editor

Hi guys,

I'm loading 2 SQL queries into Qlik Sense data load editor. Is the grammar like this?

LIB CONNECT TO...

LOAD...

SQL

SELECT...FROM...WHERE...

SELECT...FROM...WHERE...

Thanks in advance!

1 Solution

Accepted Solutions
thiago_justen
Valued Contributor III

Re: Load multiple SQL queries into data load editor

Don't forget to close this thread by marking answers those help you.

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
10 Replies
omarbensalem
Esteemed Contributor

Re: Load multiple SQL queries into data load editor

Table1:

load

a,

b,

c

select

* from source where ..

table2:

load

x,

y

select

bla bla from source2 where...

and u don't need to write the script; select ur table, and insert the script; qlik will write it for u; then u just alter what you want to alter and add ur where conditions

thiago_justen
Valued Contributor III

Re: Load multiple SQL queries into data load editor

Well, it's just like this:

LIB CONNECT TO...

TABLE_1:

SELECT...FROM...WHERE...

TABLE_2:

SELECT...FROM...WHERE...

If you want to learn more about it, here it is a good document.

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
wanyunyang
Contributor

Re: Load multiple SQL queries into data load editor

I tried:

TABLE1:

LOAD...

SELECT...

TABLE2:

LOAD...

SELECT...

It shows: Incorrect syntax near 'LOAD'.

wanyunyang
Contributor

Re: Load multiple SQL queries into data load editor

Where should I put the LOAD statement?

thiago_justen
Valued Contributor III

Re: Load multiple SQL queries into data load editor

I assume you are not familiar with the syntax used in the scripts ... So I strongly recommend that you read this document. What Omar and I mentioned above was just to exemplify the basic syntax to be used. It was not to copy and paste.

https://help.qlik.com/en-US/sense/September2017/pdf/Script%20syntax%20and%20chart%20functions.pdf

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
wanyunyang
Contributor

Re: Load multiple SQL queries into data load editor

If I just load one SQL query into data load editor, everything works well. But when I add another LOAD statement with another SQL query, it goes wrong. I'm just wondering why is that. Does it allow only one LOAD statement?

thiago_justen
Valued Contributor III

Re: Load multiple SQL queries into data load editor

No, It allows more than one load...

Could you please share your queries with us?

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
wanyunyang
Contributor

Re: Load multiple SQL queries into data load editor

I made a silly mistake! Thanks guys!

thiago_justen
Valued Contributor III

Re: Load multiple SQL queries into data load editor

Don't forget to close this thread by marking answers those help you.

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago