dbTalk Databases Forums  

Unknown problem

comp.database.oracle comp.database.oracle


Discuss Unknown problem in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kintaro
 
Posts: n/a

Default Unknown problem - 06-16-2004 , 03:57 AM






Hi again! ^_^

i'm trying to get some results from a cursor with this procedure..

(oggetto in varchar2, pagina in number, numero in number, rife out
riferimenti.curref)
as
inizio number;
fine number;
begin
inizio:= numero*pagina;
fine:= inizio+numero;
if oggetto = 'i' then
open rife for
select alarmid from imw.alarms where alarmid between inizio and fine
order by alarmid;
end if;
if oggetto = 's' then
open rife for
select alarmseverity from imw.alarms where alarmseverity between
inizio and fine
order by alarmseverity;
else
open rife for
select additionalinfo from imw.alarms where additionalinfo between
inizio and fine
order by additionalinfo;
end if;
end returnresults;

My problem is that when i exe this procedure in sql*Plus:

exec spasqua.returnresults('i', 2, 4, :looka);

i obtain this error:

SQL> print looka
ERROR:
ORA-01722: invalid number

Where's the error? :O
I'll be very glad if u can help me.. :P
10x

kin

Reply With Quote
  #2  
Old   
Michael Austin
 
Posts: n/a

Default Re: Unknown problem - 06-17-2004 , 04:34 PM






kintaro wrote:

Quote:
Hi again! ^_^

i'm trying to get some results from a cursor with this procedure..

(oggetto in varchar2, pagina in number, numero in number, rife out
riferimenti.curref)
as
inizio number;
fine number;
begin
inizio:= numero*pagina;
fine:= inizio+numero;
if oggetto = 'i' then
open rife for
select alarmid from imw.alarms where alarmid between inizio and fine
order by alarmid;
end if;
if oggetto = 's' then
open rife for
select alarmseverity from imw.alarms where alarmseverity between
inizio and fine
order by alarmseverity;
else
open rife for
select additionalinfo from imw.alarms where additionalinfo between
inizio and fine
order by additionalinfo;
end if;
end returnresults;

My problem is that when i exe this procedure in sql*Plus:

exec spasqua.returnresults('i', 2, 4, :looka);
^^^^


Quote:
i obtain this error:

SQL> print looka
ERROR:
ORA-01722: invalid number

Where's the error? :O
I'll be very glad if u can help me.. :P
10x

kin
'i' is not a number.

Michael.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.