Home » Developer & Programmer » Reports & Discoverer » urgent query...!
urgent query...! [message #184042] Tue, 25 July 2006 01:14 Go to next message
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 Go to previous message
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.
Previous Topic: Help required->landscape and portrait
Next Topic: Sorting help
Goto Forum:
  


Current Time: Thu Dec 08 12:19:39 CST 2016

Total time taken to generate the page: 0.18114 seconds