Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

performing addition subtraction division operation with subqueries

638897Aug 22 2008 — edited Aug 25 2008
Hi,

I need to divide two subqueries and please let me know how to do it.

Actually i used the select .........  from dual for each subquery for addition and subtraction and it worked .

the same way for division is not working.

Please suggest the various ways for doing this.
select
(SELECT 
(z.NEW_UPTO_THE_MONTH + z.RENEW_UPTO_THE_MONTH
+ z.AE_UPTO_THE_MONTH + z.RE_UPTO_THE_MONTH) as Premium_Upto_the_period 
FROM  CONSOL_GDPI1_UPTO)
as premium from dual

[\code]


[pre]

this throws an error tha tsingle row subquery return more than one row.

actually this  needs to be my denominator to perform the division operation .


[\pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2008
Added on Aug 22 2008
6 comments
1,185 views