
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
LOAD SQL queries from excel sheet into qlikview.
I have some set of SQL queries in excel sheet and I want to load this queries in Qlikview and perform the SQL queries in Qlikview.
Can anyone help on the same?
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can load your queries direct from the Excel file and pass the query into a variable like this example ...
/*Example Data (held in Excel file called SavedQueries.xslx)
QueryID QueryDesc Query
1 OrdersDelivered SELECT OrderID, OrderStatus FROM Orders WHERE OrderStatus = 'Delivered'
2 OrdersOutstanding SELECT OrderID, OrderStatus FROM Orders WHERE OrderStatus = 'Outstanding'
3 OrdersInProgress SELECT ….
4 OrdersPaused SELECT ….
5 InvoicedByMonth SELECT InvoiceMonth, sum(InvoiceValue) as TotalInvoiced FROM Invoices Group By InvoiceMonth
*/
Queries:
LOAD QueryID, QueryDesc, Query FROM SavedQueries.xlsx (ooxml, embedded labels, table is Sheet1);
//Lookup the value 'InvoicedByMonth' in field 'QueryDesc' in table 'Queries' and return the value in field 'Query'
//Values in QueryDesc must be unique
Let SQLCmd = Lookup( 'Query', 'QueryDesc', 'InvoicedByMonth', 'Queries' );
OLEDB CONNECT TO [...] (XPassword is ...);
InvoicedByMonth:
Load *;
SQL $(SQLCmd);
flipside
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Should share that Queries with us, Or else how we understand which Query you have? All SQL may / May not implement in Qlikview. But, Qlik has that power


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Copy and Paste??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have some basic list of queries for oracle which works very well in Qlikview.
eg: desc table name ;
Select count(*) from table name;
select * from table name;
I want to extract that query and run in qlikview.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can load your queries direct from the Excel file and pass the query into a variable like this example ...
/*Example Data (held in Excel file called SavedQueries.xslx)
QueryID QueryDesc Query
1 OrdersDelivered SELECT OrderID, OrderStatus FROM Orders WHERE OrderStatus = 'Delivered'
2 OrdersOutstanding SELECT OrderID, OrderStatus FROM Orders WHERE OrderStatus = 'Outstanding'
3 OrdersInProgress SELECT ….
4 OrdersPaused SELECT ….
5 InvoicedByMonth SELECT InvoiceMonth, sum(InvoiceValue) as TotalInvoiced FROM Invoices Group By InvoiceMonth
*/
Queries:
LOAD QueryID, QueryDesc, Query FROM SavedQueries.xlsx (ooxml, embedded labels, table is Sheet1);
//Lookup the value 'InvoicedByMonth' in field 'QueryDesc' in table 'Queries' and return the value in field 'Query'
//Values in QueryDesc must be unique
Let SQLCmd = Lookup( 'Query', 'QueryDesc', 'InvoicedByMonth', 'Queries' );
OLEDB CONNECT TO [...] (XPassword is ...);
InvoicedByMonth:
Load *;
SQL $(SQLCmd);
flipside

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the answer.
