Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Long shot, but here goes

Re: Long shot, but here goes

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sun, 11 Apr 2004 16:28:16 -0700
Message-ID: <1081726079.665460@yasure>


D. Alvarado wrote:

> I'm running Oracle 8.1.7 for Solaris.
>
> I have this long complicated query that returns 416 rows. When I try
> and embed the query in a package's stored procedure,
>
> BEGIN
> DECLARE
> CURSOR abc IS long_complicated_query;
> BEGIN
> DELETE FROM SUMMARY_SPROG_UTIL;
> FOR abc_rec IN abc
> LOOP
>
> I get the error
>
> BEGIN
> *
> ERROR at line 1:
> ORA-01722: invalid number
> ORA-06512: at "SUPPORT.SUMMARY_USAGE_PKG", line 183
> ORA-06512: at "SUPPORT.SUMMARY_USAGE_PKG", line 16
> ORA-06512: at line 6
>
>
> referring to this line, "FOR abc_rec IN abc" of all things. Oddly,
> when I run this same query through the command line, it runs, but when
> I try and put it in the package's stored procedure, I get this crazy
> error. Does anyone have any suggetsions as to how I should start
> debugging this problem?
>
> Thanks, - Dave

Replace your 'long complicated query' with SELECT * FROM dual and see what happens.

If it fails comment stuff out until you isolate the problem.

My bet is that it is your query. If not ... post the full procedure that fails using a very simple query.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Sun Apr 11 2004 - 18:28:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US