Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use nested query in qlik view reports.

I have the sql which have nested queries . I am not able to understand how to use nested query in the qlik view report.

In my query temp table has been created and then the column of the temp table is used in where condition

SELECT tmp.roster_cnt

SELECT tmp.roster_cnt

SELECT tmp.roster_cnt

as total_count, w.territory_name FROM web_track_appts w

(SELECT

NVL(SUM(WI.ROSTER_CNT), 0) roster_cnt, territory_name



FROM WEB_TRACK_APPTS WI

(

SELECT DISTINCT WRKEVNTID FROM WEB_TRACK_APPTS where appt_cnt is not null) temp

where wi.wrkevnt=temp.wrkevnt group by territory_name) temp 1

where w.territory_name=temp.territory_name

Any suggestion how to proceed on this





4 Replies
pover
Luminary Alumni
Luminary Alumni

The best practice would be to try to break down all these queries to make a data model that only contains the relationship between tables. Aggregation should be done on the graphic side of QlikView and not pre-made in the script since QlikView is not a report generator.

However you should be able to paste the SQL statement into you load statement. For example,

Load *;
SQL (Paste your statement);

If the ODBC or OLEDB supports the creation of temporary tables from nested selects then there should be no problem.

Regards.

Not applicable
Author

Do i need to create the different qvd file and then make the relation between those files.

pover
Luminary Alumni
Luminary Alumni

How are you using QVDs?

Not applicable
Author

i am executing the sql query and storing that in my qvd file. this file i am using in my report.