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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
gireesh1216
Creator III
Creator III

How To Run Sql Temp Tables query in Qlikview?

Hi All,

Please find my sql temp query and how to run this query in qlikview:

Example:

with Temp1

(

select * from Tab1

),

Temp2 as

(

select * from Temp1 A  left join Tab2

),

Temp3 as

(

select * from Temp2  right join (select * from Tab3)

)

select * from Temp3 where Req_Id is null;

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

CONNECT OLEDB ...whatever ... ;

MyTable:

SQL

     with Temp1

     (

     select * from Tab1

     ),

     Temp2 as

     (

     select * from Temp1 A  left join Tab2

     ),

     Temp3 as

     (

     select * from Temp2  right join (select * from Tab3)

     )

     select * from Temp3 where Req_Id is null

;

And pray that whatever oledb or odbc driver you use supports the sql syntax you feed it.


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Create a working sql statement

Test it

Open Qlikview

Open the Script Editor

Create a connection to the database and insert the connection statement in the script

Paste the working sql statement in the script

Reload the document to execute the script and load the data into a table


talk is cheap, supply exceeds demand
gireesh1216
Creator III
Creator III
Author

Hi Wassenaar

same sql query i ran in qlikview but getting "UNKNOWN STATEMENT" error

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

CONNECT OLEDB ...whatever ... ;

MyTable:

SQL

     with Temp1

     (

     select * from Tab1

     ),

     Temp2 as

     (

     select * from Temp1 A  left join Tab2

     ),

     Temp3 as

     (

     select * from Temp2  right join (select * from Tab3)

     )

     select * from Temp3 where Req_Id is null

;

And pray that whatever oledb or odbc driver you use supports the sql syntax you feed it.


talk is cheap, supply exceeds demand
gireesh1216
Creator III
Creator III
Author

no not working...    " with Temp1" hear with statement is not working in qlikview.


Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Qlikview doesn't understand any sql and won't try to execute it. Qlikview only sends it to the oledb or odbc driver you're using. If your driver doesn't understand it then you have to use sql that it does understand.


talk is cheap, supply exceeds demand
gireesh1216
Creator III
Creator III
Author

Thanks Its running fine....