How to work with nested tables
HI Everybody,
I have a relational table one of whose columns is an object and another column is a collection stored as a nested table. I would like to set up a user interface ADF Rich Client, where I consider the parent table as Master and the nested table as Detail. If I build a READONLY master and detail view with a view link based on the primary key of the parent table, it works fine. However, when I try to generate entities from the views, the detail view object disappears from JDeveloper. Otherwise, when I try to make business components from tables, the nested table is not listed. Do anyone know a solution?
Please help!
Here is the view creation script with table structures:
create or replace view dp_master_view as
select p.dept_no,p.dept_name, p.dept_mgr.idno mgr_idno, p.dept_mgr.name mgr_name,p.dept_mgr.phone mgr_phone from department_persons p
create or replace view dp_detail_view as
select p.dept_no,e.* from department_persons p,table(p.dept_emps) (+) e
SQL> desc department_persons
Name Null? Type
DEPT_NO NOT NULL NUMBER
DEPT_NAME CHAR(20)
DEPT_MGR PERSON_TYP
DEPT_EMPS PEOPLE_TYP
SQL> desc person_typ
Name Null? Type
IDNO NUMBER
NAME VARCHAR2(30)
PHONE VARCHAR2(20)
Thanks, regards
Miklos HERBOLY
HI Everybody,
I have a relational table one of whose columns is an object and another column is a collection stored as a nested table. I would like to set up a user interface ADF Rich Client, where I consider the parent table as Master and the nested table as Detail. If I build a READONLY master and detail view with a view link based on the primary key of the parent table, it works fine. However, when I try to generate entities from the views, the detail view object disappears from JDeveloper. Otherwise, when I try to make business components from tables, the nested table is not listed. Do anyone know a solution?
Please help!
Here is the view creation script with table structures:
create or replace view dp_master_view as
select p.dept_no,p.dept_name, p.dept_mgr.idno mgr_idno, p.dept_mgr.name mgr_name,p.dept_mgr.phone mgr_phone from department_persons p
create or replace view dp_detail_view as
select p.dept_no,e.* from department_persons p,table(p.dept_emps) (+) e
SQL> desc department_persons
Name Null? Type
DEPT_NO NOT NULL NUMBER
DEPT_NAME CHAR(20)
DEPT_MGR PERSON_TYP
DEPT_EMPS PEOPLE_TYP
SQL> desc person_typ
Name Null? Type
IDNO NUMBER
NAME VARCHAR2(30)
PHONE VARCHAR2(20)
Thanks, regards
Miklos HERBOLY
Similar Messages
-
"member of " not working with nested table of dates
Can someone explain why this doesn't work. The last select does not return any row. When trying the same with a table of number, it works fine.
drop table test;
drop type date_tab;
create type date_tab as table of date;
create table test(dates date_tab) nested table dates store as dates;
insert into test values (date_tab(to_date('10-jan-2007'),to_date('15-jan-2007'),to_date('15-jan-2007')));
commit;
select * from test where to_date('10-jan-2007') member of dates;
Line above should find the row, but does not return anything.> With 10G Oracle said that these two engines are now sharing the same source code
Is that documented somewhere? Regarding database versions, it was 9.0.1 that claimed an integrated parser. I don't see any update for 10g.
> So in the old days one had to do a [SELECT sysdate INTO d FROM dual] to assign a function value to a PL/SQL var - as the function did not exist in PL/SQL.
Then (from Oracle 7 onwards?) these functions were also available in PL/SQL. However, the two engines did not share common code. So functions in SQL did not always behave like function in PL/SQL and vice versa.
I don't recall that limitation in PL/SQL v1 (Forms 3 to 4.5, and database v6, though I doubt many people actually used PL/SQL on the database because (1) it was separately licensed, and (2) it didn't have stored procedures) - but then it was a while ago so I could be mistaken.
I know USER, SYSDATE and others used to be implicit queries of dual (i.e. the supplied PL/SQL function was just a wrapper containing SELECT SYSDATE INTO dt FROM dual; RETURN dt;) although that's probably just confusing the issue. -
Working with nested table in uix
Hello everybody,
Im using JDeveloper 9051+adf+uix.
I've to use a table in which there is a column having reference to another table(one to many relationship).
So is this kind of nested table support is provided in jdeveloper 9051??
and if available then how to use it??
Thanks and Regards
MinaHi!
Me again!
This nested table ... what is it supposed to do?
If you want the user to be able to select in that table, then that might be difficult.
Sascha -
HOW TO PLAY WITH NESTED TABLES
Hi Sir,
It would be pleasure to get any suggestion to know why i am geting following error and how to solve this problem ?
Error Message: JBO-27122: SQL error during statement preparation. Statement: SELECT REF(ExperienceTab), ExperienceTab.SYS_NC_OID$ FROM EXPERIENCE_TAB ExperienceTab
SCENERIO IS LIKE : I m trying to create Business Components .JSP Appl using wizard and then select view objects which has nested table. it is generated successful.
NOW when i try to run it is executing without any errors but it doesn't show any object of nested table. THEN i decide to select nested tables to generate ViewObjects of business components and then generate .JSP file but when i try to execute application to see the result of .JSP pages which has been generated by viewobjects. And this viewobject is generated by the nested tables the above error occurs. I am quite new in Jdev enviornment , your suggestion will be higly appreciated.
I hope my explaination is sufficient to know problem.
Thank you very much.
Musahib : [email protected]
nullHi Sir,
It would be pleasure to get any suggestion to know why i am geting following error and how to solve this problem ?
Error Message: JBO-27122: SQL error during statement preparation. Statement: SELECT REF(ExperienceTab), ExperienceTab.SYS_NC_OID$ FROM EXPERIENCE_TAB ExperienceTab
SCENERIO IS LIKE : I m trying to create Business Components .JSP Appl using wizard and then select view objects which has nested table. it is generated successful.
NOW when i try to run it is executing without any errors but it doesn't show any object of nested table. THEN i decide to select nested tables to generate ViewObjects of business components and then generate .JSP file but when i try to execute application to see the result of .JSP pages which has been generated by viewobjects. And this viewobject is generated by the nested tables the above error occurs. I am quite new in Jdev enviornment , your suggestion will be higly appreciated.
I hope my explaination is sufficient to know problem.
Thank you very much.
Musahib : [email protected]
null -
Fill datagridview with Nested Table Object Type ???
Hello everybody, please you help me resolve my problem?
I follow this example: *(A Sample Application using Object-Relational features)* http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10799/adobjxmp.htm
And this tutorial: *(Using Oracle User-Defined Types with .NET and Visual Studio)* http://www.oracle.com/technology/obe/hol08/dotnet/udt/udt_otn.htm
Now I have 3 Object Table: Stock, Customer and Purchase Order. With the tutorial it's OK to show the data of Stock and Customer Table [there is no nested table in], but I can't do this with table Purchase Order, the tutorial don't show how to work with Nested Table type [Missing or something ?]
When I try to display the data of table Purchase Order, I get the error:
typeName='LINEITEMLIST_NTABTYP'' is not specified or is invalid*
Follow the tutorial, I generate custom class for this UDT and get another error:
this.STOCK_REF = ((object)(Oracle.DataAccess.Types.OracleUdt.GetValue(con, pUdt, "STOCK_REF")));*
Argument Exception Unhandle: Object attribute is not mapped to a custom type member.*
Can You show me how to do this ? Show the data of the Nested Table in Visual Studio, do I have something wrong ??? Thanks and Best Regards.I think you need to go through the tutorial more carefully. I think you are missing steps.
You are using a REF. Are you creating an object table for the objects to be stored in? Are you dereferencing the REF? This is covered by the Oracle by Example tutorial.
http://www.oracle.com/technology/obe/hol08/dotnet/udt/udt_otn.htm#t11
When you receive the nested table, it will be inside a .NET class. You can create this class by using the Create Custom Class menu item on the nested table type in server explorer.
This class will contain a ToString method and a ToXML method.
The question is, where are you attempting to display the data from this nested table? In a grid?
Does it make sense to display a nested table inside one cell of a grid? No. You would need to construct a special UI that will show the
nested table. Maybe the user clicks on the cell on the grid, which opens a new grid that displays the data. Or maybe there is a second grid on the form that always shows the nested table for the row that the first grid currently has selected.
I realize I am not providing you the code... but it sounds like you need to design a more sohisticated UI than what the tutorial is using -- one that can handle displaying one additional table per row. -
Trying to UNION two views with nested tables
I am using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod, and my objective is to generate some XML. What I have been doing in the past, is to create a view, and then pass that view to the DBMS_XMLQuery routine. This gives me a CLOB that I pass along to the application. A typical object would be something like:
create or replace type XML_UGroup_Member_Type as object (
username varchar2(128),
group_key varchar2(128));
create or replace type XML_UGroup_Member_List
as table of XML_UGroup_Member_Type;
show errors
Create or replace type XML_UGroup_Type as object (
Group_Space varchar2(32),
group_key varchar2(128),
group_name varchar2(255),
members XML_UGroup_Member_List);
/This particular application will be doing stuff with group information. Pretty simply types - a group with a name and a few other keys, and a list of members. A sample view would be like:
create or replace view xml_department_ugroup_view of xml_ugroup_type
with object identifier ( group_key ) as
Select 'Department',
'Department:' || orgn_code,
'Department_' || orgn_name
cast ( multiset (
select Username, person_id,
'Department:' || effective_orgn
from directory_master dm, logins l
where effective_orgn = dd.orgn_code
and dm.person_id = l.owner)
as XML_UGroup_Member_List )
as members
from directory_departments dd
where dept_include = 'Y';
can select from this view, and I can pass it to the DBMS_XMLQUERY package and get a nice XML document. What I want to is essentially put several of these views together, like
Select * from XML_Department_Ugroup_View
Union
Select * from XML_Portfolio_Ugroup_View;But UNION does not work with nested tables:
ERROR at line 1: ORA-00932: inconsistent datatypes: expected - got SIMON.XML_UGROUP_MEMBER_LIST
What I was hoping to do, was to develop a set of sub views for each of the group "spaces", and then generate a view/object that includes all of the sub views, and be able to operate with that single object.
Thoughts on how to make this work, or on alternate approaches? I have considered calling XMLQuery on each of the sub views and concatenating the XML documents and returning that to the application, but I was hoping to find a more "unified" approach.I modified my approach a bit - I changed the base views to return an XMLType object, like:
create or replace view xml_portfolio_ugroup_xml
as
Select XMLElement("group",
xml_ugroup_type(
'Portfolio',
'Portfolio:' || coas_code || ':' || orgn_Code,
cast ( multiset (
select Username,
from directory_master dm, logins l
where ( effective_orgn, effective_coas ) in
where effective_orgn = dd.orgn_code
and dm.person_id = l.owner
as XML_UGroup_Member_List ))) as grp
from directory_departments dd
where dept_include = 'Y';and then I combined them with something like the following (I expect to adjust this as I learn more about the XML DB support)
create or replace view xml_ugroup_xml as
select xmlconcat(
(select xmlagg(grp) from xml_department_ugroup_xml),
(select xmlagg(grp) from xml_portfolio_ugroup_xml)
) as GROUPS
from dualand as I define more group branches, I can add them into the XMLConCat stanzas. I am still open to suggestions as to ways of doing this better or cleaner, but this at least gets the project moving forward again. -
How to work with checkbox in a table
hi im working with a table than shows SQL result and i put a column with checkboxes in the table
how can i handle the rows with the checkbox in true ? i want to do it with a button
thanksHere are more resources. By the way, I don't understand what you mean by "how can i handle the rows with the checkbox in true ? i want to do it with a button "
http://blogs.sun.com/roller/page/divas?entry=using_checkboxes_in_a_table
http://blogs.sun.com/roller/page/divas?entry=table_component_sample_project -
ANSI Standard Join with Nested Table
Does anyone know how to (or whether you actually can) use ansi standard table joins with nested tables.
Non-ansi standard would look something like this
SELECT e.empno
FROM departments d, TABLE(d.employees) e
WHERE d.deptno = 10;
Where d.employees is a nested table.
But if I try ansi-standard I like such:
SELECT e.empno
FROM departments d
JOIN TABLE(d.employees) e
WHERE d.deptno = 10;
I get
ORA-00905: missing keyword
because I have nothing to join it on.
Your help is very much appreciatedBoth replies worked fine.
I think I will go with the NATURAL JOIN as it seems the cleanest option.
Thanks Guru 2748 -
PL/SQL add procedure with nested table - Duplicate Thread
Hi,
I am trying to do a procedure to input information for one order and another for 2 orders.
The information I have so far is as follows:
Drop table Orders cascade constraints;
Drop type item_type;
Drop type Item_nested;
Create or Replace Type item_type AS Object (
Cat_code Varchar2(6),
Amount_ord Number(3),
Cost Number(5,2) );
Create or Replace Type item_nested as table of item_type;
Create Table Orders (
Order_no Varchar2(8) constraint pkorder primary key,
Customer_name Varchar2(30),
AddressLine1 Varchar2(20),
AddressLine2 Varchar2(20),
AddressLine3 Varchar2(20),
Town Varchar2(20),
Postcode Varchar2(10),
Country Varchar2(20),
Order_items item_nested,
Order_date Date)
Nested Table Order_items
Store as nested_items return as locator;
This has so far worked but I have not managed the insert procedure.
I am using Oracle SQL*plus
Thanks
SG
Edited by: user10689875 on 11-Jan-2009 03:39Duplicate thread ->
PL/SQL add procedure with nested table
Please remove it & marked it as duplicate.
Regards.
Satyaki De. -
How to Work with Composite Primary Key
Hi All,
I'm working with Toplink JPA. Here I have A problem with inserting into database table which have composite Primary Key.
What I'm doing is, I have two tables. to maintain many to many relation between these two tables I created another intermediate table which consists of foreign Keys (reference) of above two tables.
Now these two foreign Keys in the Intermediate table made as composite Primary Keys.
When I'm trying to the data in the Intermediate table I'm getting the foreign Keys values are null..
could anyone suggest me how to work with composite Primary Keys
Thanks,
SatishI have the same problem, I have 3 tables with a join table joining them all. I have created an intermediate table entity. When I go to create a an entry, it says that I cannot enter null into "ID". Here is the SQl toplink generates:
INSERT INTO Z_AUTH_USER_AUTHORIZATION (CONTEXT_ID, AUTHORIZATION_ID, USER_ID) VALUES (?, ?, ?)
bind => [null, null, null]
Here are the classes:
-----------------------Join Table-----------------------------------------------
@Entity()
@Table(name = "Z_AUTH_USER_AUTHORIZATION")
public class AuthUserAuthorization implements Serializable{
@EmbeddedId
private AuthUserAuthorizationPK compId;
// bi-directional many-to-one association to AuthAuthorization
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "AUTHORIZATION_ID", referencedColumnName = "ID", nullable = false, insertable = false, updatable = false)
private AuthAuthorization authAuthorization;
// bi-directional many-to-one association to AuthContext
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "CONTEXT_ID", referencedColumnName = "ID", nullable = false, insertable = false, updatable = false)
private AuthContext authContext;
// bi-directional many-to-one association to AuthUser
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "USER_ID", referencedColumnName = "ID", nullable = false, insertable = false, updatable = false)
private AuthUser authUser;
---------------------------------------User table--------------------------------------------------------------
@Entity()
@Table(name = "Z_AUTH_USER")
public class AuthUser implements Serializable, IUser{
@Id()
@SequenceGenerator(name = "AUTH_USER_ID_SEQ", sequenceName = "Z_AUTH_USER_ID_SEQ")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AUTH_USER_ID_SEQ")
@Column(name = "ID", unique = true, nullable = false, precision = 10)
private Integer id;
// bi-directional many-to-one association to AuthUserAuthorization
@OneToMany(mappedBy = "authUser", fetch = FetchType.EAGER)
private java.util.Set<AuthUserAuthorization> authUserAuthorizations;
-----------------------------------Context table-----------------------------------------------------------------
@Entity()
@Table(name = "Z_AUTH_CONTEXT")
public class AuthContext implements Serializable, IContext{
@Id()
@SequenceGenerator(name = "AUTH_CONTEXT_ID_SEQ", sequenceName = "Z_AUTH_CONTEXT_ID_SEQ")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AUTH_CONTEXT_ID_SEQ")
@Column(name = "ID", unique = true, nullable = false, precision = 8)
private Integer id;
// bi-directional many-to-one association to AuthUserAuthorization
@OneToMany(mappedBy = "authContext", fetch = FetchType.EAGER)
private java.util.Set<AuthUserAuthorization> authUserAuthorizations;
----------------------------Authorization table-------------------------------------------------
@Entity()
@Table(name = "Z_AUTH_AUTHORIZATION")
public class AuthAuthorization implements Serializable, IAuthorization{
@Id()
@SequenceGenerator(name = "AUTH_AUTHORIZATION_ID_SEQ", sequenceName = "Z_AUTH_AUTHORIZATION_ID_SEQ")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AUTH_AUTHORIZATION_ID_SEQ")
@Column(name = "ID", unique = true, nullable = false, precision = 8)
private Integer id;
// bi-directional many-to-one association to AuthUserAuthorization
@OneToMany(mappedBy = "authAuthorization", fetch = FetchType.EAGER)
private java.util.Set<AuthUserAuthorization> authUserAuthorizations;
I have tried to create the new entity several ways. I have tried to create one with the default constructor then set this entity on each of the other entities, I have also tried to pass in the entities to the join entity and set them there, but this doesn't work. Any help would be very appreciated!
Thanks,
Bill -
InDesign CC 2014 is very very slow when working with a table.
InDesign CC 2014 is very very slow when working with a table. Every 1/2 - 1 hour it nearly falls back, impossible to work with. While this project must be finshed quite soon..
What the hell is the matter with this Creative Cloud. I havea very fast iMac form 2014. I closed all other programmes, even cannot listen to music now. More people with this problem??
Martien@Martien – How complex is your table?
How many cells? Merged ones as well?
Complex formatting of texts inside the cells?
Complex formatting rules of table rows and/or columns?
Many images inserted?
If yes, and the table is running through many text frames of many pages, I fear, you can do nothing against slowness.
Nothing but: Greek text, not showing the page contents in the Pages Panel, in short: anything you can do to get better performance in redrawing of the screen.
If you have the chance to break up one big table in several parts, do that and edit its parts one after another isolated. Pehaps in different documents.
Then merge the parts in one table, if you want to flow it from page to page.
Uwe -
How to work with 360 video?
I am new to AE and am trying to work with a 360 equirectangular video I shot with a Freedom 360 and 6 go pros.
Are there any tutorials on how to work with 360 spherical videos? Do I need to download additional plugins?
Thank you,
PhilPhil,
Of course, the image needs to be big for this, but the plugin you would use is CC Sphere.
Drop your movie into a composition and apply CC Sphere to the video.
Then set the Render option in the effect to "Inside".
Under Shading set Ambient to 100% and Diffuse to 0%.
Then scale inside the effect until the image fills the screen.
Then you'll be able to use the Rotate Y controls in CC Sphere to spin around inside your video!
You can also add Optics Compensation and Reverse the Lens Distortion to straighten out your image.
Let me know if you have any questions!
Trent -
How to work with EEWB tool in CRM and how to assign it to PCUI
Hi Friends,
Can any body will suggest me how to work with EEWB tool in CRM to add new fields ,i need to attach the fields to a GUI screen and same to PCUI also,
And how to attach a search help for those fields,is the tool will automatically will create the search helps or it is similar as we do in abap,
So can any body suggest me to get a material on this ,
Thaking you
Regards
Raghavendra PrasadPrasad
Following are the steps involved in general :
1. Select the filter Worklist and enter your name in the input field of the object list selection. Press the enter key. Your object list is displayed.
2. Place your cursor on the highest node(PROJECT BY XXXXXX). Select Create project from the context menu by right-clicking on it. You see the dialog box Create project.
3. Enter a project name, description, packages, and namespaces for each system used. Leave the dialog box by pressing the enter key.
Specify transport requests. The Project is created and appears in the object list.
4. Place your cursor on the new project in the object list and select Create extension in the context menu. You see the dialog box Create extension.
5. Enter a name and description. Define a Business Object and extension type. Press the enter key.The extension is created and appears in the object list below the project.
6. Place your cursor on the new extension in the object list and select Call wizard in the context menu. The wizard for the extension action starts automatically.
7. Fill in the input fields following the notes on screen and end the wizard by clicking on Complete.The extension tasks have been created and appear in the object list.
Project and extension are created !
Also take care that you have the Transport Requests and Save the Project and Extensions against a Development Class !
In general , EEW will automatically puts the fields on the Screen. We donot want to worry abt that !
The generated BADIs can be implemented to do some Checks(for example) !
I hope this helps !
Thanks
<b>Allot points if this helps !</b> -
Java API for working with Pivot Tables...?
Hi,
I want to create/modify an existing pivot table in an excel sheet. Is there any open source available to work on pivot tables.
I have seen few articles mentioning that POI supports updation of data, though the apache site says that it does not support working with pivot tables. I am able to copy an existing excel template with pivot table to a new excel using poi but am stuck with updating....
Thanx,
Praveen.Hi,
The JExcelAPI does not support working with pivot tables... I am still in search of an open source to work with pivot tables....
btw, we are able to update an existing pivot table using apache poi. But we need to change the data range of the pivot table during run time... Am stuck with this... Has anyone come across any open source to work with pivots???
Regards... -
Hi,
We use OEM (12c),have db (11.2,10.2/1).
How OEM works with database?
When oem initated a job aginst db,What are the steps preformed by OEM?What are the info updated in OEM DB and Normal DB regading jobs?And Where?
BrAt what point do you get this message?
Have a look at the Windows Service. Ensure the EM Agent is running. Your database and Listener may be running, but if the Agent is not running, you will not be able to see correct status.
Stop and start the Agent
Maybe you are looking for
-
How do I get rid of the 3d effect when opening home screen? It gives me a headache.
How do I get rid of the 3d effect when opening home screen? It gives me a headache.
-
Permissions problems, keep changing and can't save from within application
Hi there, we're running Mavericks server on our local network with a half dozen MBP and iMacs connected. For a wee while now, our users have been getting permissions problems. Documents (Excel documents, InDesign, Photoshop etc.) are becoming read on
-
Organizational Unit is managed by Position
i want to know which organizational Unit is managed by which position i.e. which is the chief position in particular Organizational unit. In which table i can get this relation ship.
-
Session State Protection Violation error
I am developing my first Apex application. I have this page which has been running fine until I made some changes. The error I get is the following: -----Error message: Session state protection violation. This may be caused by manual alteration of a
-
hello , when i try to edit my video , i have after few minuts a error message like : memory saturated , and final cut stop to editing. if somebody can help me please , in french welcome too