Home » Developer & Programmer » Reports & Discoverer » Sub-queries in Discoverer - urgent!
Sub-queries in Discoverer - urgent! [message #88743] Mon, 03 March 2003 04:42 Go to next message
Eleanor Prior
Messages: 1
Registered: March 2003
Junior Member
Hi,

I have to create a workbook in Discoverer that involves a sub-query. I know sub-queries can be selected on the desktop edition when creating worksheets but I can't get it to work, as I am selecting a count in my main query and I want to sub-query the value I am counting. This SQL brings me back the correct values when I run it through SQL*Plus - I have included it here. Can I do this in Discoverer without resorting to a custom SQL folder?

SELECT count(distinct com.complaint_num)
FROM complaints com,
court_orders co,
court_diary_sittings cds
WHERE co.case_id = com.case_id
and co.complaint_num = com.complaint_num
and co.cds_id = cds.cds_id
and com.case_id = 20015
and cds.courtroom_date < to_date('19-aug-2002')
and com.complaint_num NOT IN
(
SELECT distinct com.complaint_num
FROM complaints com,
court_orders co,
court_diary_sittings cds,
order_frames orf
WHERE co.case_id = com.case_id
AND co.active_ind = 'Y'
and orf.order_frame_code = co.order_frame_code
and orf.frame_version_num = co.frame_version_num
and orf.final_ord_ind = 'Y'
and co.cds_id = cds.cds_id
and com.case_id = 20015
and cds.courtroom_date < to_date('19-sep-2002')
)

Thanks in advance :)
Re: Sub-queries in Discoverer - urgent! [message #382238 is a reply to message #88743] Wed, 21 January 2009 08:09 Go to previous message
pgeetab
Messages: 1
Registered: January 2009
Junior Member
Hi,
I also have a similar requirement. Please can you let me know, if it is possible to do this without going for a custom folder.
Any help please .
Previous Topic: How to put department wise page break.
Next Topic: Issue with Formula Column
Goto Forum:
  


Current Time: Sun May 05 11:39:34 CDT 2024