***Unable to import table which consists of nested tables
Dear all;
I have a problem on migrating my Oracle 8.1.7 database from windows nt environment into the ibm aix 4.3.3 environment. I have been using the import export utility. Exporting the data from the database does not produce any error but importing the export file produces the error as below;
Connected to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
Export file created by EXPORT:V08.01.07 via conventional path
import done in WE8ISO8859P1 character set and WE8ISO8859P1 NCHAR character set
. importing IIMS's objects into IIMS
IMP-00017: following statement failed with ORACLE error 2331:
"CREATE TABLE "CMGC_CURRENCY" ("CODE" VARCHAR2(10) NOT NULL ENABLE, "DESCP" "
"VARCHAR2(60) NOT NULL ENABLE, "X_RATE" NUMBER(10, 6) NOT NULL ENABLE, "X_DA"
"TE" VARCHAR2(10), "REMARK" VARCHAR2(255), "YEAR" NUMBER(4, 0) NOT NULL ENAB"
"LE, "BANK_AC" VARCHAR2(20) NOT NULL ENABLE, "NSTBL_LEDG" "NSTBL_LEDGLIST" N"
"OT NULL ENABLE, "NSTBL_XRATE" "NSTBL_XRATELIST" NOT NULL ENABLE) PCTFREE 1"
"0 PCTUSED 40 INITRANS 1 MAXTRANS 255 LOGGING STORAGE(INITIAL 65536) TABLESP"
"ACE "IIMS" NESTED TABLE "NSTBL_LEDG" STORE AS "NSTBL_LEDGLIST_LIST" RETURN "
"AS VALUE NESTED TABLE "NSTBL_XRATE" STORE AS "NSTBL_XRATELIST_LIST" RETURN"
" AS VALUE "
IMP-00003: ORACLE error 2331 encountered
ORA-02331: cannot create constraint on column of datatype Named Table Type
Import terminated successfully with warnings.
It seems that the error only occur when importing tables which consists on nested tables. I have done exporting and importing from windows NT into windows NT and from windows NT into AIX but the problem still arises. Please help.
NSTBL_LEDG and NSTBL_XRATE are the nested tables with NSTBL_LEDGLIST and NSTBL_XRATELIST as the datatype accordingly.
Thanks in advance;
andrew
Hi Sayak,
This means we need to installed Oracle client to resolve this problem. Can you please share if you have some knowledge regarding the same.
Thanks,
Mohit
Similar Messages
-
Unable to Import XML which consists of nested XSD's in Oracle BPEL PROCES
Hi All,
We would like to know how to read an XML file which consists of Nested XSD's in Oracle BPEL Process(Using JDeveloper).
Regards,
BijuDo check the following link
http://blogs.oracle.com/soabpm/2010/01/soa_suite_11g_weblogictransact.html -
How to cast RECORD of nested tables into OBJECT of nested tables
Right, we have an existing massive pl/sql package where some of the processing is taking too long so they want to try multithreading it.
The data in this package is stored in an array of records which contains nested tables, which themselves contain nested tables.
So, we want to split this table into 10, and submit them to 10 dbms_jobs to run concurrently, write the modified arrays to the database so they can be picked up again by the original process.
I'm stuck on converting the associative array of data (containing tables of records) into objects which can be stored in the DB.
My database objects:
CREATE OR REPLACE
TYPE ktest_claims_rt IS OBJECT
col1 varchar2(10)
,col2 varchar2(10));
CREATE OR REPLACE
TYPE ktest_claims_tt IS TABLE OF ktest_claims_rt;
CREATE OR REPLACE
TYPE ktest_driver_rt IS OBJECT
col1 varchar2(10)
,col2 varchar2(10)
,claims_nt ktest_claims_tt);
CREATE OR REPLACE
TYPE ktest_driver_tt IS TABLE OF ktest_driver_rt;
CREATE OR REPLACE
TYPE ktest_policy_rt IS OBJECT
col1 varchar2(10)
,col2 varchar2(10)
,driver_nt ktest_driver_tt);
CREATE OR REPLACE
TYPE ktest_policy_tt IS TABLE OF ktest_policy_rt;
CREATE TABLE ktest_job_table
(job_no NUMBER
,tab_type VARCHAR2(3)
,policy_nt ktest_policy_tt
NESTED TABLE policy_nt STORE AS policy_nested_tab
(NESTED TABLE driver_nt STORE AS driver_nested_tab
(NESTED TABLE claims_nt STORE AS claims_nested_tab))
/ And my local package versions:
TYPE claims_rt IS RECORD
col1 varchar2(10)
,col2 varchar2(10));
TYPE claims_tt IS TABLE OF claims_rt INDEX BY PLS_INTEGER;
TYPE driver_rt IS RECORD
col1 varchar2(10)
,col2 varchar2(10)
,claims_nt claims_tt);
TYPE driver_tt IS TABLE OF driver_rt INDEX BY VARCHAR2(20);
TYPE policy_rt IS RECORD
policy_no policy.policy_no%TYPE
,driver_tab driver_tt
,other_col VARCHAR2(20));
TYPE policy_tt IS TABLE OF policy_rt
INDEX BY pls_integer;
main_table policy_tt;What I can't get through my pea sized brain is how to turn "main_table" into an array based on ktest_policy_tt.
I got as far as:
FUNCTION convert (p_table IN policy_tt) RETURN ktest_policy_tt
IS
db_vers ktest_policy_tt := ktest_policy_tt();
db_rec ktest_policy_rt;
BEGIN
FOR i IN p_table.FIRST..p_table.LAST
LOOP
db_rec := ktest_policy_rt(p_table(i).policy_no
,p_table(i).other_col
,ktest_driver_tt(p_table(i).driver_tab(i).col1
,p_table(i).driver_tab(i).col2
,ktest_claims_tt(p_table(i).driver_tab(i).claims_nt(i).col1
,p_table(i).driver_tab(i).claims_nt(i).col1
db_vers(i) := db_rec;
END LOOP;
END;but, apart from the fact that it only coverts the first row of each table, it doesn't compile:
LINE/COL ERROR
139/10 PL/SQL: Statement ignored
143/52 PLS-00306: wrong number or types of arguments in call to
'KTEST_CLAIMS_TT'
143/52 PLS-00306: wrong number or types of arguments in call to
'KTEST_CLAIMS_TT'I'd appreciate any help as this is getting urgent.
Thanks!I would recommend writing your function in a more stepwise, explicit fashion rather than trying to write the conversion as basically one big constructor.
Firstly, you will require nested loops in your pl/sql code for the different levels of nested tables. This is not a choice, you need to do this.
Within each level of looping, explicitly create the object of the desired type before adding it to the table / record as need be.
cheers,
Anthony -
Table which consists dates of activities
Hello,
I searched for the tables in CRM where activities are saved. I found the table CRMD_ORDERADM_H which consists some informations. Now I search for the tables where the valid from date and the valid to date are saved?
Anybody knows this table?
Regards
PhilippHi Phillip,
The field planned date will appear based on the date profile that you assigned to the transaction type of activity.
Normally the SAP standard date profiles are available which will give the fields planned date, actual date etc.
If you are in GUi then when you click the filed next to start date you can find a drop down of plan date, actual date etc.
If you are on portal then the dateprofile that is assigned to the transaction will be seen in the date tab of the transaction.
let me know if i was clear or matched your understanding.
Thanks
srini -
How to insert into a table with a nested table which refer to another table
Hello everybody,
As the title of this thread might not be very understandable, I'm going to explain it :
In a context of a library, I have an object table about Book, and an object table about Subscriber.
In the table Subscriber, I have a nested table modeling the Loan made by the subscriber.
And finally, this nested table refers to the Book table.
Here the code concerning the creation of theses tables :
Book :
create or replace type TBook as object
number int,
title varchar2(50)
Loan :
create or replace type TLoan as object
book ref TBook,
loaning_date date
create or replace type NTLoan as table of TLoan;
Subscriber :
create or replace type TSubscriber as object
sub_id int,
name varchar2(25)
loans NTLoan
Now, my problem is how to insert into a table of TSubscriber... I tried this query, without any success...
insert into OSubscriber values
*(1, 'LEVEQUE', NTLoan(*
select TLoan(ref(b), '10/03/85') from OBook b where b.number = 1)
Of course, there is an occurrence of book in the table OBook with the number attribute 1.
Oracle returned me this error :
SQL error : ORA-00936: missing expression
00936. 00000 - "missing expression"
Thank you for your help1) NUMBER is a reserved word - you can't use it as identifier:
SQL> create or replace type TBook as object
2 (
3 number int,
4 title varchar2(50)
5 );
6 /
Warning: Type created with compilation errors.
SQL> show err
Errors for TYPE TBOOK:
LINE/COL ERROR
0/0 PL/SQL: Compilation unit analysis terminated
3/1 PLS-00330: invalid use of type name or subtype name2) Subquery must be enclosed in parenthesis:
SQL> create table OSubscriber of TSubscriber
2 nested table loans store as loans
3 /
Table created.
SQL> create table OBook of TBook
2 /
Table created.
SQL> insert
2 into OBook
3 values(
4 1,
5 'No Title'
6 )
7 /
1 row created.
SQL> commit
2 /
Commit complete.
SQL> insert into OSubscriber
2 values(
3 1,
4 'LEVEQUE',
5 NTLoan(
6 (select TLoan(ref(b),DATE '1985-10-03') from OBook b where b.num = 1)
7 )
8 )
9 /
1 row created.
SQL> select *
2 from OSubscriber
3 /
SUB_ID NAME
LOANS(BOOK, LOANING_DATE)
1 LEVEQUE
NTLOAN(TLOAN(000022020863025C8D48614D708DB5CD98524013DC88599E34C3D34E9B9DBA1418E49F1EB2, '03-OCT-85'))
SQL> SY. -
Confusion over nested tables and system generated nested tables
Hi,
I have been reading other threads about nested tables, naming and updating them etc, but I have what seems
to me some odd behaviour.
I modified my schema to set the attribute xdb:maintainDom to be false for a collection and then registered
the schema with the generate tables option defaulted to true. The result was that I had to add xdb:tableProps
attributes specifying nested table storage at each element above the collection element, this was because Oracle
was creating tables at each level. So I have this kind of thing:
<xsd:element name="BibPt" xdb:SQLType="BIBPT_T"
xdb:defaultTable="BIBPT"
xdb:tableProps="NESTED TABLE XMLDATA.PTEES.PTEE_SEC.PTEE STORE AS NESTED_PTEE_SEC
NESTED TABLE XMLDATA.INVS.INV STORE AS NESTED_INV_BIBPT TABLESPACE BIBLIO">
<xsd:element name="Ptees" xdb:SQLType="PTEES_T" xdb:tableProps="NESTED TABLE
XMLDATA.PTEE_SEC.PTEE STORE AS NESTED_PTEE_SEC2">When I did this the nested tables were created, but when I loaded data never had anything in them. Instead
I found that nestes tables with systems generated names like "SYSNTxxxxxxxxx" has been created that contained
the data.
When I registered the schema without the tables being generated, I created a table with this syntax:
create table poc_wip2 of xmltype
xmlschema "http://www.derwent.co.uk/wpi.xsd" element "WPI"
NESTED TABLE XMLDATA."BibPt".PTEES.PTEE_SEC.PTEE STORE AS NESTED_PTEE_SEC
NESTED TABLE XMLDATA."BibPt".INVS.INV STORE AS NESTED_INV_BIBPT(Thanks to a posting by Sam Monsarrat which showed me this was possible).
Now I had my named nested tables, which contained the data after it was loaded and no system named
nested tables.
So why the difference?
In the first instance why do my named nested tables stay empty and why does the data go into system
generated tables I have no control over as regards tablespace placement?
Is it possible to have a XML schema registered that only generates tables that I have named with the defaultTable
attribute, rather than all or nothing?
And last but not least, what's the best approach for this, since I want to be able to access the data via indexes
on the nested tables.
Thanks
PeteHi Pete
Would you please publish the schema you are using?
Thanks,
Tobias -
How to select data from one nested table and into another nested table
create or replace
TYPE ctxt_code_rec as object
ctxt_header varchar2(10),
header_description varchar2(300),
status varchar2(30),
adjacent_code varchar2(300),
adjacent_desc Varchar2(400),
adjacent_flag varchar2(4000),
adjacent_text_href varchar2(4000)
create or replace
type ctxt_code_table as table of CTXT_CODE_REC
d_table ctxt_code_table ;
v_tab ctxt_code_table ;
Iam trying to select data from d_table to v_tab
using and bulk collect into
select m.*
bulk collect into p_code_result
from table(l_loop_diag_code_table1)m
order by 1;
Receiving error:
ora 94007 : not enoughvalues
Could you please let me know how to solve it?
Thanks,
in advance>
create or replace
TYPE ctxt_code_rec as object
ctxt_header varchar2(10),
header_description varchar2(300),
status varchar2(30),
adjacent_code varchar2(300),
adjacent_desc Varchar2(400),
adjacent_flag varchar2(4000),
adjacent_text_href varchar2(4000)
create or replace
type ctxt_code_table as table of CTXT_CODE_REC
d_table ctxt_code_table ;
v_tab ctxt_code_table ;
Iam trying to select data from d_table to v_tab
using and bulk collect into
select m.*
bulk collect into p_code_result
from table(l_loop_diag_code_table1)m
order by 1;
Receiving error:
ora 94007 : not enoughvalues
Could you please let me know how to solve it?
>
Not unless you provide the code you are actually using.
There is no definition of 'p_code_result' in your post and you say you 'trying to select data from d_table' but there is no code that loads 'd_table' in what you posted.
And the SELECT query you posted actuall selects from an object named 'l_loop_idag_code_table1' which isn't mentioned in your code.
Post the actual code you are using and all of the structures being used.
Also explain why you even need to use nested tables and PL/SQL for whatever it is you are really doing. -
PL/SQL insert nested table value into another nested table.
Hi Guy
I've created a table with nested table in and inserted some values. note: this is just an example the real table has more values inserted.
REATE OR REPLACE TYPE tt_hours AS OBJECT(hours INTEGER, data NUMBER);
CREATE OR REPLACE TYPE tt_day AS VARRAY(7) OF tt_hours;
CREATE TABLE old_table
DAY DATE,
VALUE_hours tt_day
INSERT INTO old_table
(day, value_hours)
VALUES
(TO_DATE('01/06/2012 22:00:34'),
tt_DAY(
tt_hours(1,0.025727),
tt_hours(2,0.012047),
tt_hours(3,0.012857),
tt_hours(4,0.012107),
tt_hours(5,0.012849),
tt_hours(6,0.01215),
tt_hours(7,0.0129)))
I've also created another table with same structure but with no value inserted.
REATE OR REPLACE TYPE yy_hours AS OBJECT(thours INTEGER, tdata NUMBER);
CREATE OR REPLACE TYPE yy_day AS VARRAY(7) OF yy_hours;
CREATE TABLE new_table ( tDAY DATE, VALUE_thours yy_day )
I run a select from statement which workout the average of data from old table by group.
SELECT to_char(DAY, 'Day'), hours, AVG(data)
FROM old_table n, TABLE(n.value_hours) v
GROUP BY to_char(DAY, 'Day'), hours;
How do I insert the result in new_table's ?I believe I said
>
You basically need to construct the INSERT statement just like you did manually for the first table.
>
and instead you used
INSERT INTO new_table a (tday, t.hours, t.DATA) TABLE(a.value_thours) t This is what you did manually for the first table. Do you see TABLE (...) in here anywhere?
INSERT INTO old_table
(day, value_hours)
VALUES
(TO_DATE('01/06/2012 22:00:34'),
tt_DAY(
tt_hours(1,0.025727),
tt_hours(2,0.012047),
tt_hours(3,0.012857),
tt_hours(4,0.012107),
tt_hours(5,0.012849),
tt_hours(6,0.01215),
tt_hours(7,0.0129)))NO YOU DON'T - you used a tt_DAY constructor for the outer nested table and multiple tt_hours constructors for the inner nested table.
You need to do the same thing in your INSERT query. -
Suggestions On Table design - Usage of Nested Tables.
Hi All,
DB Vesion - 10.2.0.1.0
We have an existingtable say, REPORT_MASTER with more than 4 Million records.( 27 Columns )
Now the requirement is as follows: Every day, a job has to run to upadte each row in the REPORT_MASTER table. ( COLUMNs to be updated are new columns -to be designed)
Rules for the updation are generated dynamically depending on a parameter table.
In total, more than 500 update statement will run for updating the whole table (it is not possible reduce the number of updations). Now after the updation the records in the table will be like
ExistingColumns NewColumn1 NewColumn2 NewColumn3 ........
........ BRF01.1 BRF02.5 BRF03.1 .......
........ BRF01.3 BRF02.1 BRF03.2 .......
........ ...... ...... ...... ......First few updates, for example will update "NewColumn1". Next few updates will update "NewColumn2" and so on..
Now My Query is about designing the new columns:
1.If I did as the above sample output there should be 37 new columns as per current requiremnent. It can increase when new report is required.
2.If I go for a Nested Table, my concern is about the update statement. Is there any way to achieve the below code..
update report_master
set new_nested_tab_col(5) = 'BRF02.6'
where .....
And also how will be the performance?
3.If I go for a detail table, it will have a size of almost 37 times that of master_table.
I have to loop through this table (ofcourse with joining to the master table) 37 times again afetr updation for report generation. (This is required anyhow, but here data volume is high)
4. Other methode, ofcourse not very professional, is to keep a single varchar2 column and update that column, so that it will have value like
BRF01.1,BRF02.3,BRF03.1....
Or any other better alternative..?
Please suggest.
Thanks in advance,
Jeneesh
Edited by: jeneesh on Apr 13, 2009 11:36 AM
Update statements will be like as follows, if the basic design is selected :
update REPORT_MASTER set NEW_COLUMN1 = 'BRF01.1' where dynamic_condition1 and NEW_COLUMN1 is not null;
update REPORT_MASTER set NEW_COLUMN1 = 'BRF01.2' where dynamic_condition2 and NEW_COLUMN1 is not null;
update REPORT_MASTER set NEW_COLUMN2 = 'BRF02.1' where dynamic_condition25 and NEW_COLUMN2 is not null;
...Edited by: jeneesh on Apr 13, 2009 12:40 PM
Taking it to front....
Edited by: jeneesh on Apr 14, 2009 8:37 AM
Still I am not comfortable to use 37 columns..APC wrote:
Not sure what you're expecting from us. I'm afraid you haven't explained your scenario clearly, so it's difficult to offer design advice. I will try to explain better:
Basically, requirement is to generate 37 (BRF01 to BRF37) reports from the table CRB_OUTPUT_VIEW_TAB.
(This is the Master Data Table - In the original thread I have mentioed it as REPORT_MASTER).
Each report needs to apply different rules. For this, a RULE table(Parameter table) is provided.
Master Data Table
SQL> desc crb_output_view_tab
Name Null? Type
COMPANY VARCHAR2(240)
GLNO VARCHAR2(144)
CURRENCY VARCHAR2(15)
CUSTOMER_NAME VARCHAR2(240)
ACC_DEAL_NO VARCHAR2(29)
FCY VARCHAR2(18)
LCY VARCHAR2(18)
INT_EXH_RT NUMBER
VALUE_DATE VARCHAR2(10)
MAT_DATE VARCHAR2(10)
CUSTOMER VARCHAR2(50)
BRANCH VARCHAR2(25)
INT_BASIS VARCHAR2(10)
OGLKEY VARCHAR2(207)
SECTOR VARCHAR2(6)
INDUSTRY VARCHAR2(6)
TARGET VARCHAR2(2)
RESIDENCE VARCHAR2(2)
NATIONALITY VARCHAR2(2)
REPORT_DATE VARCHAR2(11)
GL_DESC VARCHAR2(50)
PORTFOLIO VARCHAR2(10)
LOAN_TYPE VARCHAR2(10)
EXH_RT NUMBER
BLSHEET VARCHAR2(50)
SOURCE CHAR(3)
CATEGORY VARCHAR2(6)
BRF_CODE VARCHAR2(20)
DR_CR VARCHAR2(6)
NA VARCHAR2(6)
Rules - Master Table
SQL> select * from brf_parameters order by brf_id,seq;
PARAM_ID BRF_ID SEQ BRF_CODE COLUMN_NAME DATA_TYPE
2 BRF01 1 BRF010001 GLNO CHAR
1 BRF01 1 BRF010001 CURRENCY CHAR
3 BRF01 2 BRF010002 GLNO CHAR
4 BRF01 3 BRF010006 GLNO CHAR
6 BRF01 4 BRF010008 GLNO CHAR
5 BRF01 4 BRF010008 RESIDENCE CHAR
390 BRF02 1 BRF020001 RESIDENCE CHAR
391 BRF02 1 BRF020001 BRF_PARENT CHAR
392 BRF02 2 BRF020002 RESIDENCE CHAR
393 BRF02 2 BRF020002 INDUSTRY CHAR
394 BRF02 2 BRF020002 BRF_PARENT CHAR
Rules - detail Table: (Linked to brf_parameters by param_id)
SQL> select * from brf_param_values where param_id in (1,2);
PARAM_ID CONDITION VALUE1 VALUE2
1 IN AED
2 IN 0010
SQL> ed
Wrote file afiedt.buf
1 select p.seq,p.brf_id,p.brf_code,p.column_name,v.condition,v.value1,v.value2
2 from brf_parameters p,brf_param_values v
3 where p.param_id = v.param_id
4* order by p.brf_id,p.seq,p.param_id
SQL> /
SEQ BRF_ID BRF_CODE COLUMN_NAME CONDITION VALUE1 VALUE2
1 BRF01 BRF010001 CURRENCY IN AED
1 BRF01 BRF010001 GLNO IN 0010
2 BRF01 BRF010002 GLNO IN 0010
3 BRF01 BRF010006 GLNO IN 0030
4 BRF01 BRF010008 RESIDENCE IN AE
4 BRF01 BRF010008 GLNO IN 0040
5 BRF01 BRF010009 GLNO IN 0040
6 BRF01 BRF010004 GLNO IN 0050
6 BRF01 BRF010004 CATEGORY IN 5001
6 BRF01 BRF010004 DR_CR IN Debit
7 BRF01 BRF010049 DR_CR IN Debit For genarating the report BRF01 :
Updation will be done based on each "SEQ" value shown above. So..
Ist update: (Generated from SEQ = 1 for BRF_ID = BRF01)
update crb_output_view_tab set new_brf_code_column = 'BRF010001'
where currency in ('AED') and GLNO in ('0010');
--This is sample. it will be like : GLNO in ('0010','0040','0056'.....)IInd update: (Generated from SEQ = 2 for BRF_ID = BRF01)
update crb_output_view_tab set new_brf_code_column = 'BRF010002'
where GLNO in ('0010')
and new_brf_code_column is null;..... And so on.
The data in the "new_column" is required for report generation.
After all the updations the report "BRF01" (through UTL_FILE) will be generated.
After that updation for BRF02 will be performed and report will be generated.
I have to store the data for all BRF01,BRF02.. because these are used for online reports which are accessed from Discoverer also.
What changes are you making that has lead to you considering nested tables or child tables? I have explained in detailed manner above. (Please revert if not clear)
Why would a detail table be 37 times as big as one table? I was thinking of adding a PK to "crb_output_view_tab" and a new detail table like
pk_from_crb_output_view_tab NUMBER
brf_id VARCHAR2
brf_code VARCHAR2Now here the number of rows will be 37* number_of_rows_in_crb_output_view_tab
Big in which dimension(s)? I have to join the master table and new_detail_table for each report generation
What drives the design - the updating of REPORTS_MASTER or the application which uses the updated data?The time for updation and daily generation of 37 reports (We can ignore the performance of discoverer reports)
Thanks,
Jeneesh -
Unable to Import LCMBIAR which Contains Publication
Hi Experts,
We are using BO 4.0 SP6. We are trying to backup our file from production server to DR server.
At first, we exported all the reports in one LCMBIAR (we have selected all the dependencies) and imported in DR but failed.
So we suspect their is an issue about the file size, therefore we tried to export folder by folder and import again in DR server. All the LCMBIAR files are successful imported except for a LCMBIAR file which contains publication.
Is there any limitation? Please advice.
Regards,
Kim YunHi Kim,
There are few knows issues when we try to promote publications through Promotion management. Have you tried with live promotion instead of LCMBIAR. Please refer below KBAs for know issues for this.
1797845 - LCM jobs with publications do not compute dependencies
correctly resulting in failure when promoted
1752996 - LifeCycle Management fails to promote publication. 'CE SDK
Exception occurred : 'Not a valid query. (FWB 00025)'
1791025 - When adding a Publication to a Promotion Management Job
any extra Objects are added
1871782 - BI 4.1 - Unable to promote Publications
Most of the issues were in BI 4.0 and should be resolved in BI 4.1. I would suggest to try direct promotion instead of LCMBIAR and let us know the error message if it fails.
Regards,
Hrishikesh -
Error while create trigger on for nested table
I want to insert a record into a nested table.For this, I created a view for the table, which includes the nested table.It told me ORA-25015 cannot perform DML on this nested table view column.So I created a trigger for the nested table.However, it told me that ORA-25010 Invalid nested table column name in nested table clause.I think my nested table is valid, i don't konw why did it appear this kind of problem?
My table is
CREATE TABLE ENT
ID NUMBER(7) NOT NULL,
CREATE_DATE VARCHAR2(11 BYTE),
UPDATE_DATE VARCHAR2(11 BYTE),
DEPTS VARRAY_DEPT_SEQ
CREATE OR REPLACE
TYPE DEPT AS OBJECT
ID NUMBER(8),
ANCHOR VARCHAR2(20),
CREATE OR REPLACE
TYPE " VARRAY_DEPT_SEQ" as varray(930) of DEPT
CREATE OR REPLACE VIEW ENT_NESTED_VIEW
(ID, CREATE_DATE, UPDATE_DATE, DEPTS)
AS
select e.ID,cast(multiset(select r.id,r.anchor from ent z, table(z.depts) r where z.ID=e.ID )as varray_dept_seq)
FROM ENT e
Then when I created trigger;
CREATE OR REPLACE TRIGGER EMP.ENT_NESTED_TRI
INSTEAD OF INSERT
ON NESTED TABLE DEPTS OF EMP.ENT_NESTED_VIEW
REFERENCING NEW AS New OLD AS Old PARENT AS Parent
FOR EACH ROW
BEGIN
END ;
I met the problem: ORA-25010 Invalid nested table column name in nested table clause
Could you please tell me the reason
Thank you!
My insert SQL is:
insert into table(select depts from ent_nested_view where id=1856) values(varray_dept_seq(dept(255687,'AF58743')))
Message was edited by:
user589751Hi,TongucY
Compared with the "Referencing Clause with Nested Tables" part of this reference -
http://psoug.org/reference/instead_of_trigger.html, I found the answer of this
quesion. That is "CREATE OR REPLACE TYPE " VARRAY_DEPT_SEQ" as[b] varray(930) of
DEPT". It turns to be a varying array, not a nested table. It should be "CREATE OR
REPLACE TYPE " VARRAY_DEPT_SEQ" as table of DEPT". That is OK. Thank you very
much!
While there is an another question, if I create a varying array like" CREATE OR
REPLACE TYPE " VARRAY_DEPT_SEQ" as[b] varray(930) of DEPT " and I want to insert
a record into the varying array, which the record has been existed.The method that
create a view and a trigger seems not to be effective.
For instance,
There is a record in the table
ID:1020
CREATE_DATE:2005-10-20
UPDATE_DATE:2007-2-11
DETPS: ((10225,AMY))
I want to ask this record to be
ID:1020
CREATE_DATE:2005-10-20
UPDATE_DATE:2007-2-11
DETPS: ((10225,AMY),(10558,TOM))
How should I do?
Could you please help me?
Best regards.
Message was edited by:
user589751 -
Problems with Whitespace using nested tables from eclipse dtp oracle plugin
Hi,
sending from eclipse to oracle xe fails if whitespace is used:
Example1: Nested table in nested table
adress_table_typ has another nested table in it
that works
CREATE TABLE x (
i INTEGER PRIMARY KEY,
adressen adress_table_typ
) NESTED TABLE adressen STORE AS adressen_nt (NESTED TABLE tels STORE AS tels_nt);
inserting a newline fails
CREATE TABLE x (
i INTEGER PRIMARY KEY,
adressen adress_table_typ
) NESTED TABLE adressen STORE AS adressen_nt
(NESTED TABLE tels STORE AS tels_nt);
Example2:
Two nested tables
CREATE TABLE x (
i INT PRIMARY KEY,
l_table_typ,
m_table_typ
) NESTED TABLE laptops STORE AS laptop_nt NESTED TABLE interessen STORE AS interessen_nt;
and then an insert
INSERT INTO x VALUES (123456,
l_typ(laptop_typ('123', 'netop'),
laptop_typ('234', 'thinkpad'),
laptop_typ('345', 'iBook')),
m_typ('a', 'b', 'c')
which fails. Note that the INSERT works when copy&pasted to sqlplus. It also works if there is
just one nested table.
Am I doing somethig wrong or is this a bug in the eclipse data tools plugin?
Regards
- Peter
PS; It is rather difficult to insert whitespace in that forum editor. Any possibility to have ascii?
For a "whitespace" question rather important...A bit of an update on the original post. I was playing around with the plug-in xml file (e.g. eclipse\plugins\org.eclipse.jst.server.generic.oc4j_1.5.100.v20070608\buildfiles\oracle.10.1.3.xml). I changed the following from "deploy" to "redeploy" and it seems to be working once the applicatoin is initial deployed. Of course, I have to change it back to "deploy" if it is the first time the application is being deployed. However; I would still would like to resolve this if there is something out there that fixes this problem. Or if everything points to an enviornment problem, I can continue to play with it.
<target name="deploy.j2ee.ear" depends="check.skip.ear.deploy" unless="skip.deploy">
<antcall target="package.module.ear"/>
<oracle:redeploy
deployerUri="${deployer.uri}"
userId="${oc4j.admin.user}"
password="${oc4j.admin.password}"
file="${server.publish.dir}/${module.name}.ear"
deploymentName="${module.name}"
bindAllWebApps="${oc4j.bind.website}"/>
</target> -
Querying Nested Table......
Hi,
I am new to this nested table topic, I am facing problem in querying nested table. Actually i had created a table which consists of details regarding Applications and the platforms. As an application can run on more than one platform i had created a nested table for platform.
CREATE OR REPLACE TYPE TY_PLATFORM AS OBJECT
( VC_PLATFORM VARCHAR2(64) );
CREATE OR REPLACE TYPE NT_TY_PLATFORM AS TABLE OF TY_PLATFORM;
I am using this nested table in the main table application:
CREATE TABLE T_APPLICATION
( N_APPLICATION_ID NUMBER(32,6),
VC_APPLICATION_NAME VARCHAR2(160),
CL_NT_PLATFORM NT_TY_PLATFORM )
NESTED TABLE CL_NT_PLATFORM STORE AS CL_NT_PLATFORM_TAB
The table contains the data like this(Just for example):
N_APPLICATION_ID VC_APPLICATION_NAME PLATFORM
1 ABC Unix, Windows
2 DEF Unix, MVS
3 GHI Unix, Windows
4 JKL Unix, Windows, MVS
I have created the scripts like this...
INSERT INTO T_APPLICATION(N_APPLICATION_ID, VC_APPLICATION_NAME) VALUES(1,'ABC');
Like that for all applications...
UPDATE T_APPLICATION SET CL_NT_PLATFORM=NT_TY_PLATFORM(TY_PLATFORM('Unix'),TY_PLATFORM('Windows')) WHERE N_ACCESS_NUMBER=1;
Like that for all applications.....
After creation i had queried
SQL> select t.n_application_id from t_application t,table(cl_nt_platform)p
2 where p.vc_platform='Unix' and p.vc_platform='Windows' and p.vc_platform!='MVS';
no rows selected
Actually i want the application list which run on unix and windows platform but not MVS
It want the result like this:
T.N_APPLICATION_ID
1
2
but it is returning no rows selected.......
Please help me......
Thanks in advance.....Wrong forum my friend. This forum is for XML DB related issues, and while we use nested tables, we never have to worry about those nasty objects that were generated by XML Schema registration :)...
I think you need...
Objects -
View of values in nested table attribute of object type
Hi,
I have:create or replace type ctx_line is object (
ctx_name varchar2(40),
ctx_value varchar2(1000)
create or replace type ctx_tab is table of ctx_line;
create type tp as object (
id number,
ctx ctx_tab
create table tt of tp nested table ctx store as ctx_nesttab;
create or replace view v as
SELECT VALUE(o).id as id
FROM tt o;Now I want to create an another view containing fields ctx_name, ctx_value and a key (maybe NESTED_TABLE_ID?) to the parent record in tt table. I must be able to join that view to each other. This is necessary because I will use that views in Forms 4.5 (which do not support nested tables).
Can someone help me, please?I'm not sure what you are looking for exactly but is it something like this?
SELECT id
, p.ctx_name
, p.ctx_value
FROM tt
, TABLE(ctx) pWith the following test data:
INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('A','SOME VALUE1')));
INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('B','SOME VALUE2')));
INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('B','SOME VALUE2')));this is the result:
SQL> SELECT id
2 , p.ctx_name
3 , p.ctx_value
4 FROM tt
5 , TABLE(ctx) p
6 /
ID CTX_NAME CTX_VALUE
1 A SOME VALUE1
1 B SOME VALUE2
1 B SOME VALUE2 -
Let's assume I have a table containing only one column with users. Behind this table I have a nested table containing different lists. Thus, one database row consists of one user and different list names. However, every user should be only allowed to use unique list names, e.g. the listname "list 1" should be only one time usable for one user. But also every other user should be able to use this name, so the restriction of the key should refer to every row, NOT to the whole nested table.
If I set listname unique, this name can only be used one time for ALL users, not just for ONE. I thought nested tables would manage such problems - what am I doing wrong?Thanks again. I tried your solution and it worked. However, I have to admit that the whole task is a little more complicated and so I'll just post the SQL-Statement:
CREATE TABLE JMEDOCS.KARTEIVERWALTUNG (
KVUSERID VARCHAR(30) NOT NULL,
KVKOSTSTELLE JMEDOCS.KARTEILISTE_NT,
CONSTRAINT KVUSERID_BENUTZER FOREIGN KEY(KVUSERID)
REFERENCES JMEDOCS.BENUTZER(USERID))
NESTED TABLE KVKOSTSTELLE STORE AS
KARTEILISTE_NT_TAB
(NESTED TABLE KLNEUELISTE STORE AS
KATLISTNRNEU_NT_TAB,
NESTED TABLE K_LISTEN STORE AS KATLISTEN_NT_TAB
(NESTED TABLE KLKATLISTNR STORE AS
KATLISTNRALT_NT_TAB));
If I would like to put the following piece of code somewhere in this statement - where do I have to put it?
((primary key (nested_table_id, klkostnr)) organization index compress)
Maybe you are looking for
-
Help!! I just updated my iPad 2 into IOS 5.1.1.. When it finished updating, I can't open all of my games. Please help me fix this. :( thank you.
-
Error while deploying enterprise application on weblogic 11gr1(10.3.3)
Hi folks, I got an error while starting an .ear file(ALRuleBean). weblogic.management.ManagementException: [Deployer:149188]No application named 'ALRuleBean' exists for operation start. Operation can not be performed until server is restarted. Please
-
Record what is live on screen with QT 7.6.9
i am running windows 7 with sp1 and just got quicktime 7.6.9 and i am trying to record what is happening live on my screen and i cant seem to figure out what i am doing wrong trying to record a live video in real time can any one help thanks
-
Prompt for Apple ID of another iphone user appears when purchasing apps
When I try to purchase an app, the Apple ID that appears & the password asked for in the prompt is for my boyfriend's phone & not mine. We both have iphones (mine is a 4, his a 4s).
-
Hello, I have been using photoshop CS 5 for about 6 months now, and have yet to have a problem with it (except one, but I wont get into that). Until reacently it has been running very smoothly. One day I was making a few things (400x300) so not that