Discussion

3
Replies
703
Views
Close popover
Jose Navas (josenavas)
Hoverstate

Hoverstate
SV
josenavas Member since 2013 34 posts
Hoverstate
Posted: August 24, 2015
Last activity: September 9, 2015
Closed

Replicate SQL with sub-queries inside PRPC

Hi,

I'm trying to replicate this SQL in PRPC:

SELECT T1.pxassignedoperatorid,
  T1.TOTAL,
  T2.SLADEADLINE
FROM
  (SELECT pxassignedoperatorid,
    COUNT (*) AS TOTAL
  FROM pc_assign_workbasket
  GROUP BY pxassignedoperatorid
  ) T1
LEFT OUTER JOIN
  (SELECT pxassignedoperatorid,
    COUNT (*) AS SLADEADLINE
  FROM pc_assign_workbasket
  WHERE pxdeadlinetime IS NOT NULL
  GROUP BY pxassignedoperatorid
  ) T2
ON T1.pxassignedoperatorid = T2.pxassignedoperatorid
ORDER BY T1.pxassignedoperatorid

 

To get a table like this:

PXASSIGNEDOPERATORID | TOTAL | SLADEADLINE

WorkBasket1 | 18 | 3

WorkBasket2 | 688 | (null)

WorkBasket3 | 1029 | 66

 

The above works in Oracle's SQL Developer. But I can't seem to find a solution in PRPC using Report Definitions... I tried using two Sub-Reports (one for each query in the parenthesis) inside a Report Definition, but I can't configure the "left outer join".

Any help is appreciated.

Thanks,

Jose

Reporting
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Discussion, please write a new Discussion.