Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Import sql file into qlikview

Hi,

I know that I can do SQL queries inside the script using the

SQL SELECT * FROM table1;

syntax. However, I have a file called queryTable1.sql which contains the same line above and would like to know if I can import this file into the script and run the query without copy pasting the content.

Thanks in advance!

1 Solution

Accepted Solutions
Highlighted
Specialist II
Specialist II

Hi,

I think it should work with :

$(include = "your query file.sql")

regards

View solution in original post

4 Replies
Highlighted
Specialist II
Specialist II

Hi,

I think it should work with :

$(include = "your query file.sql")

regards

View solution in original post

Highlighted

Your query file looks like an export from some RDBMS. If that's the case, remember to put a SQL keyword in front of Olivier's $Include construct, as it doesn't usually come with regular SQL statements and is a QlikView Script requirement.

Insert - Include Statement - select the required file.

$(Include=D:\..\..\desktop\sales dashboard\module.txt);

$(Include=sales_orders.qvs);

$(Include=queryTable1.sql);

Highlighted
Contributor III
Contributor III

Hi,

i am new in qlikview.. can you show full script when export local sql file into qlikview? 

@ogautier62  @luizcieslak 

Thanks,