Home » SQL & PL/SQL » SQL & PL/SQL » perfect square
perfect square [message #212317] 
Thu, 04 January 2007 12:25 
ishika_20
Messages: 339 Registered: December 2006 Location: delhi

Senior Member 


hello team.
i am facing problem while writing block.
can any one give me the logic.
i want to find whether the number which will i insert
is perfect square or not ?
i am too confused about it.
please give me the logic..rest i will do.
regards
ishika



Re: perfect square [message #212323 is a reply to message #212317] 
Thu, 04 January 2007 12:47 
srinivnp
Messages: 136 Registered: January 2006 Location: stlouis MO USA

Senior Member 


select case when floor(sqrt(49))=sqrt(49) then 'YES' else 'NO' end
from dual
bspmgphm>/
CASEWHENFLOOR(SQRT(49))=SQRT(4

YES
#########
Instead of 49 use your variable or column value.
Srini



Goto Forum:
Current Time: Sat Dec 03 09:55:06 CST 2016
Total time taken to generate the page: 0.09772 seconds
