Home » Developer & Programmer » Reports & Discoverer » linking issue
linking issue [message #278655] Mon, 05 November 2007 05:15 Go to next message
brintha
Messages: 28
Registered: August 2007
Junior Member
hi all,
I have two queries which has no link with each other. But they have two count values each of some field say 'xyz'. I need to perform division operation between the two counts. Is that possible. If so please help me out with the solution.

Regards,
Brintha.R

Re: linking issue [message #278665 is a reply to message #278655] Mon, 05 November 2007 06:06 Go to previous messageGo to next message
skooman
Messages: 912
Registered: March 2005
Location: Netherlands
Senior Member
Well, I suppose we could work something out using analytical functions. But why do you want this?
Re: linking issue [message #278672 is a reply to message #278665] Mon, 05 November 2007 06:25 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Here's an example; see if you can use it.

Create two queries: first will select count of employees who work in department 10:
select count(*) c1 
from emp 
where deptno = 10
The second query will return number of employees in department 20, along with the ratio value you need to display:
select count(*) c2, 
       count(*) / :c1 c_divide_c2_by_c1  --> this is what you are looking for
from emp 
where deptno = 20

Use Report Wizard to create a paper layout. The final result is as follows:

./fa/3341/0/
  • Attachment: ratio.PNG
    (Size: 1.48KB, Downloaded 198 times)
Re: linking issue [message #278711 is a reply to message #278655] Mon, 05 November 2007 07:58 Go to previous message
brintha
Messages: 28
Registered: August 2007
Junior Member
Little foot & Skooman,
Thank you so much for your replies. Little foot thank you for helping me out to solve the query.

Regards,
Brintha.R


Previous Topic: populate workbooks on portal
Next Topic: setting pagesize
Goto Forum:
  


Current Time: Thu Dec 08 14:11:18 CST 2016

Total time taken to generate the page: 0.11601 seconds