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!

Pi constant 3,14* - is there an embedded function/command for pi

skahlertDec 9 2009 — edited Dec 9 2009
Hello experts!

Just a short question that is bugging me. Instead of defining pi manually I'd like to know wether Oracle 10g has an embedded call for the constant Pi? I couldn't find any info in google. Thus I'm asking you.

I have the following sql/statement and am working with apex:
SELECT 
(SELECT (SELECT COUNT(INV_PT_ID_SUB) FROM VT_PUNKTDATEN_JOIN WHERE CNT_GEBIET = :P480_CNT_GEBIET
AND INT_STATUS_SUB = 3 AND (STR_LRT_MAIN = :P480_STR_LRT) AND (INT_BE_MAIN = :P480_BE)) * 
INT_RADIUS_BIOTOPBAUM_SUB * INT_RADIUS_BIOTOPBAUM_SUB * 15 * 15 * 3.1415926  FLACHE
FROM VT_PUNKTDATEN_JOIN P
WHERE 
(P.CNT_GEBIET=:P480_CNT_GEBIET 
AND P.INT_STATUS_SUB=3
AND P.STR_LRT_MAIN = :P480_STR_LRT AND P.INT_BE_MAIN = :P480_BE)
GROUP BY P.INT_RADIUS_BIOTOPBAUM_SUB) BIOTOPBAUMFLAECHE,
(COUNT(B.INT_BM) + COUNT(B.INT_BHG) + COUNT(B.INT_BHK))  * 10000 / (SELECT (SELECT COUNT(INV_PT_ID_SUB) FROM VT_PUNKTDATEN_JOIN WHERE CNT_GEBIET = :P480_CNT_GEBIET
AND INT_STATUS_SUB = 3 AND (STR_LRT_MAIN = :P480_STR_LRT) AND (INT_BE_MAIN = :P480_BE)) * 
INT_RADIUS_BIOTOPBAUM_SUB * INT_RADIUS_BIOTOPBAUM_SUB * 15 * 15 * 3.1415926  FLACHE
FROM VT_PUNKTDATEN_JOIN P
WHERE 
(P.CNT_GEBIET=:P480_CNT_GEBIET 
AND P.INT_STATUS_SUB=3
AND P.STR_LRT_MAIN = :P480_STR_LRT
AND P.INT_BE_MAIN = :P480_BE)
GROUP BY P.INT_RADIUS_BIOTOPBAUM_SUB) AS HOEHLERBAUME,
P.STR_LRT_MAIN
FROM 
VT_TBL_BIOTOPBAUM B,
VT_PUNKTDATEN_JOIN P
WHERE 
(P.CNT_GEBIET = :P480_CNT_GEBIET)
AND (B.LNG_INV_PT_ID = P.INV_PT_ID_SUB)
AND (P.STR_LRT_MAIN = :P480_STR_LRT)
AND (P.INT_STATUS_SUB = 3)
AND (P.INT_BE_MAIN = :P480_BE)
GROUP BY 
P.STR_LRT_MAIN
Instead of writing Pi as 3,1415926 I'd like to have a constant such as Pi, without using pl/sql however!

Is it possible?

Regards,

Seb
This post has been answered by ravikumar.sv on Dec 9 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2010
Added on Dec 9 2009
7 comments
7,838 views