urgent query...! [message #184042] |
Tue, 25 July 2006 01:14 |
rk_panuganti
Messages: 1 Registered: July 2006
|
Junior Member |
|
|
Hi,
i have a problem in my report...
iam using the following package in my report query...
MY query is an union of 2 queries.
whenever iam using the package in a single query it's working
but if iam using it with a union in both queries...
it's giving the following error....
For ur information
i got this piece of code from this forum itself....
it's working fine for a single query, but for multiple queries i have this problem...
ora-22905: cannot access rows from a non nested table item...
my pakcage is like this...
CREATE OR REPLACE PACKAGE P_RET_ARRAY IS
TYPE ARRAY11 IS TABLE OF VARCHAR2(250);
FUNCTION ret_array(str VARCHAR2)
RETURN ARRAY11 PIPELINED;
END;
CREATE OR REPLACE PACKAGE BODY P_RET_ARRAY IS
FUNCTION ret_array(str VARCHAR2)
RETURN ARRAY11 pipelined
IS
str1 VARCHAR2(100);
num1 VARCHAR2(5);
ARRAY1 ARRAY11;
BEGIN
str1 := str ||',';
WHILE LENGTH(str1)>=0
LOOP
num1 := TO_CHAR(SUBSTR(str1,1,INSTR(str1,',',1)-1));
pipe ROW (num1);
str1 := SUBSTR(str1,INSTR(str1,',',1)+1);
END LOOP;
--NULL;
RETURN ;
END;
END;
plz if anybody has the solution ....
feel free to answer...
what should i do to run my query without this error being raised.
[Updated on: Tue, 25 July 2006 01:16] Report message to a moderator
|
|
|
Re: urgent query...! [message #184101 is a reply to message #184042] |
Tue, 25 July 2006 06:35 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Have you tried running the query that you use in Reports in SQL*Plus.
Does it work there?
Can you post the actual query that you are having problems with.
|
|
|