Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
luizcieslak
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
ogautier62
Specialist II
Specialist II

Hi,

I think it should work with :

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

regards

View solution in original post

4 Replies
ogautier62
Specialist II
Specialist II

Hi,

I think it should work with :

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

regards

Peter_Cammaert
Partner
Partner

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.

balabhaskarqlik

Insert - Include Statement - select the required file.

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

$(Include=sales_orders.qvs);

$(Include=queryTable1.sql);

adambrian
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,