| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sine and cosine function from plsql
Abiy Alemu wrote:
> 
> How does the call to sine and cosine functions work in plsql ?  I tried
> select cos(value) into variable from dual , with value of number type.
> 
> |-----------------------------------------------------------------------------|
> | If the only tool you have is a        | Abiy Alemu abiy_at_biotec.jouy.inra.fr |
> | hammer, everything in the world       | 9, avenue calmels                   |
> | seems like a nail.____________________| 92270 Bois colombes (France)________|
-- 
As with any other function supported in PL/SQL (N.B. not decode!)
you can just assign the result to the variable, thus:
declare
   var number;
   val number;
begin
   ...
   var := cos(val);
   ...
end;
(In fact, you should *never* have to "select .. from dual"
 in PL/SQL)
HTH
Chrysalis
FABRICATI DIEM, PVNC
('To Protect and to Serve')
Terry Pratchett : "Guards Guards"
Received on Fri Sep 26 1997 - 00:00:00 CDT
![]()  | 
![]()  |