Cannot access Rows from a non-nested table item..
create or replace package types
as
type cursorType is ref cursor;
end;
create or replace function sp_ListEmp
return types.cursortype
as
l_cursor types.cursorType;
begin
open l_cursor for select ename, empno from Scott.emp order by ename;
return l_cursor;
end;
=====================
Select * from Table (sp_ListEmp)
=====================
Can this Select by executed anyway without changing upper code.. I found some casting sort of solution but cannot get the exact one.. please help
Or this way:
HR%xe> select sp_listemp from dual;
SP_LISTEMP
CURSOR STATEMENT : 1
CURSOR STATEMENT : 1
LAST_NAME EMPLOYEE_ID
Abel 174
Ande 166
Atkinson 130
Austin 105
Baer 204
Baida 116
Banda 167
Bates 172
Bell 192
Bernstein 151
Bissot 129
LAST_NAME EMPLOYEE_ID
Bloom 169
Bull 185
Cabrio 187
Cambrault 154
Cambrault 148
Chen 110
Chung 188
Colmenares 119
Davies 142
De Haan 102
Dellinger 186
LAST_NAME EMPLOYEE_ID
Dilly 189
Doran 160
Ernst 104
Errazuriz 147
Everett 193
--
Similar Messages
-
ORA-22905: cannot access rows from a non-nested table item in Table func
I am using a table function in Oracle 8.1.7.4.0. I did declare an object type and a collection type like this:
CREATE TYPE t_obj AS OBJECT ...
CREATE TYPE t_tab AS TABLE OF t_obj;
My table function returns t_tab and is called like this:
SELECT ... FROM TABLE (CAST (my_pkg.table_fnc AS t_tab)) ...
This works pretty well as long as I run it in the same schema that owns the function and the 2 types. As soon as I run this query from another schema, I get an ORA-22905: cannot access rows from a non-nested table item error, even though I granted execute on both the types and the function to the other user and I created public synonyms for all 3 objects.
As soon as I specify the schema name of t_tab in the cast, the query runs fine:
SELECT ... FROM TABLE (CAST (my_pkg.table_fnc AS owner.t_tab)) ...
I don't like to have a schema hard coded in a query, therefore I'd like to do this without the schema. Any ideas of how to get around this error?Richard,
your 3 statements are correct. I'll go ahead and log a TAR.
Both DESCs return the same output when run as the other user. And, running the table function directly in SQL*Plus (SELECT my_pkg.table_fnc FROM dual;) also returns a result and no errors. The problem has to be in the CAST function.
Thanks for your help. -
ORA-22905: cannot access rows from a non-nested table item
Hi All,
This is the overview of the query used in the package.
select ename,empno,sal,deptno from
(select deptno from dept) a,
(select ename,empno,sal from emp1) b
where empno in (select * from table (pkg1.fun1('empno')))
and a.deptno=b.deptno
union
select ename,empno,sal,deptno from
(select deptno from dept) c,
(select ename,empno,sal from emp2) d
where empno in (select * from table (pkg1.fun1('empno')))
and c.deptno=d.deptno
Here the pkg1.fun1 will convert the string ('empno') into table form. ('empno') is the input parameter to the package and is a string of emp numbers.
compilation is successful. when this is executed the below error pops up
"ORA-22905: cannot access rows from a non-nested table item"
Is there any problem with the table function which i am using in this query
could anyone guide me to the solution.
Thanks AllI have used
CREATE OR REPLACE
type tab_num as table of number;
select * from table (cast(pkg1.fun1('empno')) as tab_num))
This throws an error during compilation itself
"PL/SQL: ORA-00932: inconsistent datatypes:expected number got varchar2 -
Oracle error ORA-22905: cannot access rows from a non-nested table item
Oracle error ORA-22905: cannot access rows from a non-nested table item
Creating a report using oracle plsql code .
Getting error ;
Oracle error ORA-22905: cannot access rows from a non-nested table item
when I am trying to pass data in clause in pl sql proc
basically I have a proc which takes 2 parameters(a and b)
proc (
P_a varchar2,
p_b varchar2,
OUT SYS_REFCURSOR
culprit code which is giving me the error and on google they say cast it but I dont know how to do it in my context
--where id in (
-- SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_a) FROM dual)
-- union
-- SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_b) FROM dual)
data sample returned from this :SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_a) FROM dual)
'Abc','def',
data sample returned from this;SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_b) FROM dual)
'fgd','fth',
Any answers ?
How to pass data in clause in a better wayWhy are you creating a duplicate post? I already asked you to post p_cd_common.get_table_from_string. In particular what is function return type and where it is declared. As I already mentioned, most likely function return type is declared in the package and therefore is PL/SQL type. And TABLE operator can only work with SQL types.
SY. -
SP which returns error cannot access rows from a non-nested table item.
Dear Experts
I have an SP which gives error " cannot access rows from a non-nested table item ". But here the strange thing is, it works fine with one query. But I write union query with another table, only then it gives error.
CREATE OR REPLACE PROCEDURE SP_MONTHLYSALESUMMARY (
P_TRANSACTIONMONTH VARCHAR2,
P_LEDGERID VARCHAR2,
O_RESULTSET OUT TYPES.CURSORTYPE)
AS
BEGIN
OPEN O_RESULTSET FOR
-- POINT OF SALE
SELECT
L.DESCRIPTION LEDGERNAME,
LS.DESCRIPTION LEDGERSUBGROUPNAME,
C.CORPORATENO
|| E.EMPLOYEENO
|| AF.AFFILIATEMEMBERNO
|| M.MEMBERNO
AS ID,
C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
SUM(CASE
WHEN PB.EMPLOYEE_ID IS NOT NULL
AND T.ISCREDITTRANSACTIONMODE = 2
THEN
PB.TAXAMOUNT
ELSE
0
END)
EMPLOYEEDEBITCARDTAXAMOUNT,
L.PRINTNO
FROM POINTOFSALEBILL PB
INNER JOIN POINTOFSALEBILLDETAIL PD
ON PB.POINTOFSALEBILL_ID = PD.POINTOFSALEBILL_ID
INNER JOIN TRANSACTIONTYPE TY
ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
INNER JOIN TRANSACTIONMODE T
ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
INNER JOIN LEDGER L
ON L.LEDGER_ID = PD.LEDGER_ID
INNER JOIN LEDGERSUBGROUP LS
ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
LEFT JOIN CORPORATE C
ON C.CORPORATE_ID = PB.CORPORATE_ID
LEFT JOIN EMPLOYEE E
ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
LEFT JOIN AFFILIATEMEMBER AF
ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
LEFT JOIN MEMBER M
ON M.MEMBER_ID = PB.MEMBER_ID
WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
AND (P_TRANSACTIONMONTH IS NULL
OR P_TRANSACTIONMONTH =
TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
AND (P_LEDGERID IS NULL
OR L.LEDGER_ID IN
( (SELECT COLUMN_VALUE
FROM TABLE(GET_ROWS_FROM_LIST1 (
P_LEDGERID,
GROUP BY L.DESCRIPTION,
LS.DESCRIPTION,
C.CORPORATENO
|| E.EMPLOYEENO
|| AF.AFFILIATEMEMBERNO
|| M.MEMBERNO,
C.NAME || E.NAME || AF.NAME || M.NAME,
L.PRINTNO;
END SP_MONTHLYSALESUMMARY;
GET_ROWS_FROM_LIST1 is a function, which i am using to pass " IN " to oracle. There is no problem with this, since it works fine with one query
REATE OR REPLACE FUNCTION BCLUB1868.GET_ROWS_FROM_LIST1
(L IN LONG DEFAULT NULL, SEP IN VARCHAR2 DEFAULT ',')
RETURN MYVARCHARTABLE1 PIPELINED
AS
L_POS INT := 1;
L_NEXT INT;
L_PART VARCHAR(500);
BEGIN
SELECT INSTR( L, SEP, L_POS) INTO L_NEXT FROM DUAL;
WHILE (L_NEXT>0)
LOOP
SELECT SUBSTR(L, L_POS, L_NEXT - L_POS) INTO L_PART FROM DUAL;
PIPE ROW(L_PART);
SELECT L_NEXT + 1, INSTR( L, SEP, L_POS)
INTO L_POS, L_NEXT FROM DUAL;
END LOOP;
SELECT SUBSTR(L, L_POS) INTO L_PART FROM DUAL;
PIPE ROW(L_PART);
RETURN;
END;
Request help from you all experts in the forumHere it is
CREATE OR REPLACE PROCEDURE SP_GRCS (
P_TRANSACTIONMONTH VARCHAR2,
P_LEDGERID VARCHAR2,
O_RESULTSET OUT TYPES.CURSORTYPE)
AS
BEGIN
OPEN O_RESULTSET FOR
-- Point of sale
SELECT *
FROM ( SELECT L.DESCRIPTION LEDGERNAME,
LS.DESCRIPTION LEDGERSUBGROUPNAME,
C.CORPORATENO
|| E.EMPLOYEENO
|| AF.AFFILIATEMEMBERNO
|| M.MEMBERNO
AS ID,
C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
SUM(CASE
WHEN PB.EMPLOYEE_ID IS NULL
AND T.ISCREDITTRANSACTIONMODE = 1
THEN
PB.BILLAMOUNT
ELSE
0
END)
MEMBERDEBITAMOUNT,
L.PRINTNO
FROM POINTOFSALEBILL PB
INNER JOIN POINTOFSALEBILLDETAIL PD
ON PB.POINTOFSALEBILL_ID = PD.POINTOFSALEBILL_ID
INNER JOIN TRANSACTIONTYPE TY
ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
INNER JOIN TRANSACTIONMODE T
ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
INNER JOIN LEDGER L
ON L.LEDGER_ID = PD.LEDGER_ID
INNER JOIN LEDGERSUBGROUP LS
ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
LEFT JOIN CORPORATE C
ON C.CORPORATE_ID = PB.CORPORATE_ID
LEFT JOIN EMPLOYEE E
ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
LEFT JOIN AFFILIATEMEMBER AF
ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
LEFT JOIN MEMBER M
ON M.MEMBER_ID = PB.MEMBER_ID
WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
AND (P_TRANSACTIONMONTH IS NULL
OR P_TRANSACTIONMONTH =
TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
AND (P_LEDGERID IS NULL
OR L.LEDGER_ID IN
( (SELECT COLUMN_VALUE
FROM TABLE(GET_ROWS_FROM_LIST1 (
P_LEDGERID,
GROUP BY L.DESCRIPTION,
LS.DESCRIPTION,
C.CORPORATENO
|| E.EMPLOYEENO
|| AF.AFFILIATEMEMBERNO
|| M.MEMBERNO,
C.NAME || E.NAME || AF.NAME || M.NAME,
L.PRINTNO
UNION ALL
-- Guest Registration
SELECT L.DESCRIPTION LEDGERNAME,
LS.DESCRIPTION LEDGERSUBGROUPNAME,
C.CORPORATENO
|| E.EMPLOYEENO
|| AF.AFFILIATEMEMBERNO
|| M.MEMBERNO
AS ID,
C.NAME || E.NAME || AF.NAME || M.NAME AS NAME,
SUM(CASE
WHEN PB.EMPLOYEE_ID IS NULL
AND T.ISCREDITTRANSACTIONMODE = 1
THEN
PB.BILLAMOUNT
ELSE
0
END)
MEMBERDEBITAMOUNT,
L.PRINTNO
FROM GUESTREGISTRATION PB
INNER JOIN GUESTREGISTRATIONDETAIL PD
ON PB.GUESTREGISTRATION_ID = PD.GUESTREGISTRATION_ID
INNER JOIN TRANSACTIONTYPE TY
ON TY.TRANSACTIONTYPE_ID = PB.TRANSACTIONTYPE_ID
INNER JOIN TRANSACTIONMODE T
ON T.TRANSACTIONMODE_ID = PB.TRANSACTIONMODE_ID
INNER JOIN LEDGER L
ON L.LEDGER_ID = PD.LEDGER_ID
INNER JOIN LEDGERSUBGROUP LS
ON LS.LEDGERSUBGROUP_ID = L.LEDGERSUBGROUP_ID
LEFT JOIN CORPORATE C
ON C.CORPORATE_ID = PB.CORPORATE_ID
LEFT JOIN EMPLOYEE E
ON E.EMPLOYEE_ID = PB.EMPLOYEE_ID
LEFT JOIN AFFILIATEMEMBER AF
ON AF.AFFILIATEMEMBER_ID = PB.AFFILIATEMEMBER_ID
LEFT JOIN MEMBER M
ON M.MEMBER_ID = PB.MEMBER_ID
WHERE TY.ISDEBIT = 1 AND PB.FLAG = 0 AND T.ISROOMNO = 2
AND (P_TRANSACTIONMONTH IS NULL
OR P_TRANSACTIONMONTH =
TO_CHAR (PB.BILLDATE, 'fmMONTH-YYYY'))
AND (P_LEDGERID IS NULL
OR L.LEDGER_ID IN
( (SELECT COLUMN_VALUE
FROM TABLE(GET_ROWS_FROM_LIST1 (
P_LEDGERID,
GROUP BY L.DESCRIPTION,
LS.DESCRIPTION,
C.CORPORATENO
|| E.EMPLOYEENO
|| AF.AFFILIATEMEMBERNO
|| M.MEMBERNO,
C.NAME || E.NAME || AF.NAME || M.NAME,
L.PRINTNO)
ORDER BY PRINTNO;
END SP_GRCS;
I have even tried adding L.Ledger_ID in select statement. -
ERROR:-22905:ORA-22905: cannot access rows from a non-nested table item
Hi. I have some code running on oracle 9i that gives me above error.
Following are my type declarations.
drop type_obj_tea_icore_glr;
drop type_tbl_tea_icore_glr;
create or replace type type_obj_tea_icore_glr as object (
ns_comp_id_parent number,
ns_comp_id_child number,
serv_item_id number,
glr_display_order number,
exchange_carrier_circuit_id varchar2(53)
show err
create or replace type type_tbl_tea_icore_glr as table of type_obj_tea_icore_glr;
show err
I have a function in an oracle package tea_icore_pkg with following signature.
FUNCTION sortpvcdesign (
p_document_number serv_req_si.document_number%TYPE,
p_pvc_serv_item_id serv_item.serv_item_id%TYPE,
p_orig_port_serv_item_id serv_item.serv_item_id%TYPE
RETURN type_tbl_tea_icore_glr
If I run following from SQL prompt, it works fine.
SELECT * FROM TABLE (tea_icore_pkg.sortpvcdesign(255082,2782636,2723752) );
But when I use that within another procedure of the same packge, as follows:
FOR glr_rec IN
(SELECT *
FROM TABLE
(CAST
(sortpvcdesign (c_pvcs.order_nbr,
c_pvcs.pvc_serv_item_id,
c_pvcs.orig_port_serv_item_id
) AS type_tbl_tea_icore_glr
LOOP
At the runtime, I got the above error message ( as referred to in subject ). I took all of the suggestions on CAST without much success. The user/schema is only one schema here. I mean, no permissions issue. I granted all on above types to public.
Can someone help?Bil,
I tried both with CAST and without CAST with specifying the colums. The same error.
OR glr_rec IN
(SELECT ns_comp_id_parent, ns_comp_id_child, serv_item_id,
glr_display_order, exchange_carrier_circuit_id
FROM TABLE
(CAST
(sortpvcdesign (c_pvcs.order_nbr,
c_pvcs.pvc_serv_item_id,
c_pvcs.orig_port_serv_item_id
) AS type_tbl_tea_icore_glr
LOOP -
Greetings Gurus,
I'm getting an ORA-22905 when I try and do a full outer join in the following function. If I include the commented lines in the perstren_diff_recs2 function I get the error. Both halfs of the union query work by themselves. When I union them bam error. Also, when I use the full outer join syntax the Oracle session craps the bed with a end of file communication error. That is why I'm using the simulated full outer join.
My goal was to abstract the XML in my queries. The results from the pipelined function is a delta between what is in the XML document and a relational base table.
Derrick
CREATE OR REPLACE PACKAGE XML_UTILS is
TYPE perstren_typ is record (
uic varchar2(6),
tpers varchar2(2),
deply varchar2(6),
secur varchar2(1),
struc number(4),
auth number(4)
TYPE perstren_diff_typ is record (
uic varchar2(6),
transaction_type char(1),
tpers varchar2(2),
deply varchar2(6),
secur varchar2(1),
struc number(4),
auth number(4)
TYPE perstrenSet is table of perstren_typ;
TYPE perstrenDiffSet is table of perstren_diff_typ;
function perstren_recs (uic varchar2) return perstrenSet pipelined;
function perstren_diff_recs2 (uic varchar2) return perstrenDiffSet pipelined;
end;
CREATE OR REPLACE PACKAGE BODY XML_UTILS is
function perstren_diff_recs2 (uic varchar2) return perstrenDiffSet pipelined is
cursor perstren_recs_cur(in_uic varchar2) is
select p.uic, p.tpers, p.deply, P.secur, p.struc,p.auth,
doc.uic as xmluic,
doc.tpers as xmltpers,
doc.deply as xmldeply,
doc.secur as xmlsecur,
doc.struc as xmlstruc,
doc.auth as xmlauth
from perstren_bac p left outer join
table(xml_utils.perstren_recs(in_uic)) doc
on (p.uic = doc.uic and
p.tpers = doc.tpers and
p.deply = doc.deply)
where p.uic = in_uic;
-- union
-- select p.uic, p.tpers, p.deply, P.secur, p.struc,p.auth,
-- doc.uic as xmluic,
-- doc.tpers as xmltpers,
-- doc.deply as xmldeply,
-- doc.secur as xmlsecur,
-- doc.struc as xmlstruc,
-- doc.auth as xmlauth
-- from perstren_bac p right outer join
-- table(xml_utils.perstren_recs(in_uic)) doc
-- on (p.uic = doc.uic and
-- p.tpers = doc.tpers and
-- p.deply = doc.deply)
-- where doc.uic = in_uic;
out_rec perstren_diff_typ;
begin
for cur_rec in perstren_recs_cur(uic) loop
if cur_rec.xmldeply is not null and cur_rec.xmltpers is not null then
out_rec.uic := cur_rec.xmluic;
out_rec.tpers := cur_rec.xmltpers;
out_rec.deply := cur_rec.xmldeply;
out_rec.secur := cur_rec.xmlsecur;
out_rec.struc := cur_rec.xmlstruc;
out_rec.auth := cur_rec.xmlauth;
else
out_rec.uic := cur_rec.uic;
out_rec.tpers := cur_rec.tpers;
out_rec.deply := cur_rec.deply;
out_rec.secur := cur_rec.secur;
out_rec.struc := cur_rec.struc;
out_rec.auth := cur_rec.auth;
end if;
if cur_rec.uic is not null and cur_rec.xmldeply is not null and cur_rec.xmltpers is not null and (
nvl(cur_rec.secur,'XX') != nvl(cur_rec.xmlsecur,'XX') or
nvl(cur_rec.struc,9999) != nvl(cur_rec.xmlstruc,9999) or
nvl(cur_rec.auth,9999) != nvl(cur_rec.xmlauth,9999)) then
out_rec.transaction_type :='U';
elsif cur_rec.uic is null and cur_rec.xmldeply is not null then
out_rec.transaction_type :='I';
elsif cur_rec.uic is not null and cur_rec.xmldeply is null then
out_rec.transaction_type :='D';
else
out_rec.transaction_type :='O';
end if;
PIPE row (out_rec);
end loop;
exception
when others then
if perstren_recs_cur%isopen then
close perstren_recs_cur;
end if;
raise;
return;
end;
function perstren_recs (uic varchar2) return perstrenSet pipelined is
cursor perstren_recs_cur(in_uic varchar2) is
select uic,
extractvalue(Column_value,'/PERSTREN/TPERS') as TPERS,
extractvalue(Column_value,'/PERSTREN/DEPLY') as DEPLY,
extractvalue(Column_value,'/PERSTREN/SECUR') as SECUR,
extractvalue(Column_value,'/PERSTREN/STRUC') as STRUC,
extractvalue(Column_value,'/PERSTREN/AUTH') as AUTH
from test_ref ref,
table(XMLSequence(extract(ref.XML_DOC,'/RasDataSet/PerstrenList/PERSTREN'))) per
where ref.uic = in_uic;
out_rec perstren_typ;
begin
open perstren_recs_cur(uic);
loop
fetch perstren_recs_cur into out_rec;
exit when not perstren_recs_cur%FOUND;
PIPE row (out_rec);
end loop;
close perstren_recs_cur;
exception
when others then
if perstren_recs_cur%isopen then
close perstren_recs_cur;
end if;
raise;
return;
end;
end;Oracle bug when executing the query in a function
-
Hi when i run this query its showing an error ORA_22905 cannot access rows
hi when i run this query its showing an error ORA_22905 cannot access rows from an non nested table item can anyone help me out
SELECT
DISTINCT SERVICE_TBL.SERVICE_ID , SERVICE_TBL.CON_TYPE, SERVICE_TBL.S_DESC || '(' || SERVICE_TBL.CON_TYPE || ')' AS SERVICE_DESC ,SERVICE_TBL.CON_STAT
FROM
TABLE(:B1 )SERVICE_TBL
WHERE
CON_NUM = :B2
thanks & regardsNote the name of this forum is SQL Developer *(Not for general SQL/PLSQL questions)* (so for issues with the SQL Developer tool). Please post these questions under the dedicated SQL And PL/SQL forum.
Regards,
K. -
How to get selected row from a non-bind ADF table
Hi,
I have an ADF table that is based on a collectionModel built programmatically. The collectionModel is this:
model = new SortableModel(new ArrayList<ArrayList>());
Hence, it is not a binding table. My question is how to get the selectedRows from a non-bind table.
I am used to building binding ADF table and I know we can get it from voiterator.getCurrentRow, since the selectionListener is set to the binding....collectionModel.makeCurrent
<af:table value="#{bindings.ItasLookupTypesVO1.collectionModel}"
selectedRowKeys="#{bindings.ItasLookupTypesVO1.collectionModel.selectedRow}"
selectionListener="#{bindings.ItasLookupTypesVO1.collectionModel.makeCurrent}"
</af:table>
I am thinking maybe I need to write my own selectionListener, but need more advice/ideas of what's the codes in the customer selection Listener to get it from my SortableModel.
Please help.
Thanks
-MinaI'm not sure if this works in your case, but check out the selection listener I write in this blog http://wp.me/pcBZk-eu
You should use the selection event and check the added set. This should give you access to the selected row.
Timo -
Sql query, from xml to nested table
Hello!
I have DB table: my_table
It has 2 fields: file_id and file_data (it's clob with xml)
I need to write query that returns info from xml using nested table (Oracle v.9)
The number of rows witch will return query must be equal to number of files (file_id)
Structure of XML:
<?xml version = "1.0" encoding = "utf-8"?>
<head>
<AAA v1="a" v2="b">
<BBB p1="1" p2="2"/>
<BBB p1="3" p2="4"/>
</AAA>
<AAA v1="c" v2="d">
<BBB p1="5" p2="6"/>
<BBB p1="7" p2="8"/>
<BBB p1="9" p2="0"/>
</AAA>
</head>
I have query, witch works! but not optimally! each CLOB scaned 3 times - I want to scan it once!
SELECT an.file_id,
CAST(MULTISET(SELECT extract(VALUE(val2),'//@v1').getStringVal() v1,
extract(VALUE(val2),'//@v2').getStringVal() v2,
CAST(MULTISET(SELECT extract(VALUE(val3),'//@p1').getStringVal() p1,
extract(VALUE(val3),'//@p2').getStringVal() p2,
FROM TABLE (XMLSEQUENCE(XMLTYPE(an.file_data).EXTRACT('/head/AAA/BBB[../@v1='||extract(VALUE(val2),'//@v1').getStringVal()||']'))) val3) AS T_VAL3) info
FROM TABLE (XMLSEQUENCE(XMLTYPE(an.file_data).EXTRACT('/head/AAA'))) val2) AS T_VAL2) head
FROM (SELECT olr.*
FROM my_table olr,
TABLE (XMLSEQUENCE(XMLTYPE(file_data)).EXTRACT('/head'))) val1) an
PLEASE, help me to rewrite this query!I assume you're using nested objects like these to hold the result?
create type t_val3_rec as object ( p1 number, p2 number );
create type t_val3 as table of t_val3_rec;
create type t_val2_rec as object ( v1 varchar2(30), v2 varchar2(30), c1 t_val3 );
create type t_val2 as table of t_val2_rec;
/then this query should work :
SELECT t.file_id
, CAST(
MULTISET(
SELECT extractvalue(value(x1), '/AAA/@v1')
, extractvalue(value(x1), '/AAA/@v2')
, CAST(
MULTISET(
SELECT extractvalue(value(x2), '/BBB/@p1')
, extractvalue(value(x2), '/BBB/@p2')
FROM TABLE(XMLSequence(extract(value(x1), '/AAA/BBB'))) x2
AS t_val3
FROM TABLE(XMLSequence(extract(value(x), '/head/AAA'))) x1
AS t_val2
FROM my_table t
, TABLE(XMLSequence(extract(xmltype(t.file_data), '/head'))) x
; -
Cannot find row from context to build the RowKey
I have a table with 8 attributes!
6 attributes are varchar2(20), so the input is just in textfields, the other 2 are booleans varchar2(1)!
To select the boolean I made 2 comboboxes with the displayvalues Yes/No and datavalues Y/N!
When I change 1 of the 6 attributes with the textfield, everything goes fine, but when I want to edit 1 of the 2 boolean attributes I get the following error:
oracle.jbo.JboException: Cannot find row from context to build the RowKey
The strangest thing is that all the settings from the attributes are the same and also the code in the dataeditcomponent.
Does anyone knows what the error means and especially how to solve it!?
If I change a boolean value the change is saved, but the error comes before you can see the changes!Hi Steve,
thanks for your help.
These are my steps to build the application:
0.) JDev 904, WindowsXP, IE6.x, FireBird 0.7
1.) New Project and Wizard 'New Business Components Package',
only DeptImpl, default VO and default AppModule
2.) New Project, Wizard 'Complete Struts-Based JSP Application'
only default settings
3.) Customize config of AppModule: Referenced Pool Size = 1
4.) Start application, connect with two different browsers (IE and firebird)
5.) Browse page DeptView1_Browse with both browsers
1. Browser: Link Edit --> edit&update attribute Loc of Dept 10 (no commit)
2. Browser: Link Edit --> edit (no update) attribute Loc of Dept 20
6.) 2. Browser: update ==> Error Message: Cannot find row from context to build the RowKey
I have also tested JDev 9034/9033 with no error :-)
I have build the same application in JDev 10g with ADF (no migration from other projects)
and ran into another error message (same steps as above):
JBO-29000: Unexpected exception caught: java.lang.reflect.InvocationTargetException, msg=null
I don't know if my ADF-Struts project is assembled correctly but it works with just one session.
My intention to set Referenced Pool Size = 1 was to test my code against some session releated bugs.
I wanted to associate user information like name, role and PK with the SessionCookie instance (during login), via
SessionCookie.setUserData(myInfos). The Information is used in VOs to get only the user related data
and in EOs to store the real user name in an attribute like modifiedby/createdby
(I use Tomcats as deployment platform):
getApplicationModule().getSession().getUserData() -or-
getDBTransaction().getSession().getUserData()
Is there a better way to link own data to a 'session' on the level of business components?
Can you reproduce my results?
Ciao Markus -
Just upgraded to Mavericks. Now I cannot access scans from my hp scanner. After it complete the scans and I try to save as tiff, jpeg or pdf I get a either a grey blur or a message that says cannot save because the file cannot be written to. I did not have any problems before the upgrade. I would greatly appreciate any light shed on this.
Go to the HP site and look for drivers for your scanner. It apparently needs an updated driver to work with Mavericks.
-
I have a National Lottery online account but for a while now i cannot access it from my MacBook. I can access it via other pc's and laptops and via my iphone. I have been on to the NL helpline and they say the issue is with cookies and my MacBook. Help!
Hi Josh,
Thanks for taking the time to contact us here a Novation for technical support. Lets continue to correspond via email so we can get your issue resolved.
Thanks.
Mike Towns -
I cannot access anyone from my global address book, not even through the search. Any suggestions? iOS 7.0.4
I could access this before.mouse1832 wrote:
I've been to apple to speak to one of the so called genius' and even their baffled by the problem
and they told you , "Oh well" and you left without getting it resolved? -
I cannot access itunes from appletv to rent a movie. I just get the perpetual clock after clicking the verification ok box
You could try using the wifi only when you need it. This could cut down the number of times you will have to press OK. It won't fix it but it could help.
Maybe you are looking for
-
hello guys ..when i try to update any applecation..it puts the first user a ccount and it ask the password which i dont know it cause im not the first user of this i pad ,,,,so how can i changebit to update apps dute to my account name and password??
-
Delete Everywhere?!
I have numerous pics in my camera roll. I've 'moved' many to apropriate albums, but the originals remain in the camera roll! It's a mess! When I try to delete them from the camera roll, it tells me that it will delete everywhere or cancel. What t
-
HT204371 How to set airport exprex as a client mode
How can use may print with usb port with may 1st generation airport as extended wifi
-
Hey my serial number didnt work
Hey I´m using premiere Elements 12 on windows 8. I bought the CD one year ago and install them. All perfekt but after i set back my Laptop to new and i want to install it, the number didnt work.... I have the bundle with Photoshop elements 12 and the
-
How to Stop the process chain if it in the middle of the process?
Hi, Is there anyway that i can stop the process chain if it is in the middle of the process already? Raj