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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
narender123
Specialist
Specialist

Subquery in Qlikview?

Hello Team,
Please tell me, How to handle this subquery in Qlikview?

select * from track t
where t.doc_ver =
(SELECT MAX (doc_ver)
FROM un_asybrk_track tr,ied i
WHERE tr.ied_id = i.ied_id )

 

Thanks,

Narender

4 Replies
MayilVahanan

HI 

You can use same query in Qlik itself. 

Or 

Load * from track.qvd(qvd);

Inner join

Load Id, Max(doc_ver) as doc_ver from un_asybrk_track.qvd(Qvd) group by Id;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
narender123
Specialist
Specialist
Author

Hi Mayil,
Thanks for your suggestion.


I did this at the script level.

mix:

load

MAX (doc_ver),ied
FROM un_asybrk_track tr group by ied;

inner join

load

ied
FROM ied ;

no concatenate

newmix:

Load * resident mix;

drop mix;

use this new mix table for join track table.

 

Thanks,

Narender

QFabian
MVP
MVP

Hi @narender123 , did you try with EXISTS() in your Where?, is a efficient way to do what you want.

https://help.qlik.com/en-US/sense/November2020/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecor...

 

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
narender123
Specialist
Specialist
Author

Hi QFabian,


Thanks for your reply.

I used direct query in QlikView during qvd conversion because inner join option is showing wrong data.

After my report, I will try with Exit() and let you know.

 

Thanks.

Narender