Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to convert the below PL/SQL query in to Qlik Sense Script and get the result, I am new to Qlik Sense so please help me here.
Select
p.party_id
,p.addr_line_1
,p.addr_line_2
,p.city,p.state
,p.postal_cd_prim
,p.status_code
from party_address p
where p.status_code = 'A'
group by
p.party_id
,p.addr_line_1
,p.addr_line_2
,p.city,p.state
,p.postal_cd_prim
,p.status_code
having count(distinct p.addr_id) > 1
Thank you,
Raghu
You can run native SQL commands directly. Below "MyTableName" would be the name you want in Qlik for the table. Then simply use SQL keyword to run any native select command.
MyTableName:
SQL Select p.party_id
,p.addr_line_1
,p.addr_line_2
,p.city,p.state
,p.postal_cd_prim
,p.status_code
from party_address p
where p.status_code = 'A'
group by
p.party_id
,p.addr_line_1
,p.addr_line_2
,p.city,p.state
,p.postal_cd_prim
,p.status_code
having count(distinct p.addr_id) > 1;
If you want to create nicer names for you fields in Qlik you can use the LOAD syntax like this
MyTableName:
Load p.party_id as "Party ID",
p.addr_line_1 as "Address Line 1",
p.addr_line_2 as "Address Line 2",
etc
p.status_code as "Status Code";
SQL Select p.party_id
,p.addr_line_1
,p.addr_line_2
,p.city,p.state
,p.postal_cd_prim
,p.status_code
from party_address p
where p.status_code = 'A'
group by
p.party_id
,p.addr_line_1
,p.addr_line_2
,p.city,p.state
,p.postal_cd_prim
,p.status_code
having count(distinct p.addr_id) > 1;