You'll first need to get the data from the database to be able to store it in a qvd. You can store only one table in one qvd: store MyTable into xxx.qvd (qvd);. And getting the data from the qvd is a simple Mytable: load * from xxx.qvd (qvd); Nothing more is needed. You simply load the entire table from the qvd into qlikview.
That would be something like this:
load * from genpolicy.qvd (qvd);
load * from mdr_policy.qvd (qvd);
first load all fields from the genpolicy.qvd file into a table named gen_mdr_policy. Then inner join that table with all fields loaded from the mdr_policy.qvd file. The resulting table is still named gen_mdr_policy and now contains the inner join of the two datasets from the two qvd files
I have tried to convert your PL SQL in QV statements..
It is not a complete script but atleast you will get an idea of how to do it with qlikview.
Few point to check:
1. First identify all the Raw tables from the PLSQL and store it in QVD's
e.g Seeing your PLSQl script, the table you want is
2. Identify the joins and calulation conditions you want to apply.As in SQL in Qlikview also you can Join tables.Take help from below blog for understanding joins in Qlikview.
"POL_CANCEL_CDE" AS Key1,
"POLICY_KEY" as Key2
FROM "INSIGHT"."GENPOLICY" ;
"MDRCANCELREF_KEY" AS Key1
Drop field Key1;
"MDR_POLICY_KEY" as Key2,
"MDR_PRODUCT_CDE" As Key1
FROM "INSIGHT"."MDR_POLICY" ;
"MPD_PRODUCT_KEY" AS Key1
Inner Join( GENPOLICY)
Drop table MDR_POLICY_T;
IF ( "MPD_UW_CDE"=8,'Chartis Policy Cancellations', IF ( "MPD_UW_CDE"=10,'Chartis Policy Cancellations','Other Policy Cancellations')) as [Policy Cancellations]
Drop table GENPOLICY_T;
Hope it will help you in solving your problem.