Forms :: Multiple One To Many Relationship
Apr 27, 2010
I have a table which has 2 one to many relationships like a tree structure in the same table, is there a way that I can show the same on the form and be able to do the insert and update on the same table?
View 10 Replies
ADVERTISEMENT
Feb 21, 2012
I have a form that contains a tab canvas. On the second canvas page I have two data blocks with a master detail relationship.The first block (master) is driven by a table (table_one) with the following fields:
sf_id (PK)
sf_code - VARCHAR2(40)
sf_desc - VARCHAR2(250)
The second block (detail) is a repeating block driven by a table (table_two) with the following fields:
error_code - VARCHAR2(40
error_code_desc - VARCHAR2(250)
is_major_error - VARCHAR2(1)
error_type - VARCHAR2(1)
error_is_active - VARCHAR2(1)
update_date - DATE
sf_id (FK - table_one.sf_id)
The second block only shows error_code and error_code_desc. The point of this canvas page is to add/remove master records and associate detail records with a master. I never want to actually insert or remove records from table two; merely updating the sf_id column in table two.What I am trying to achieve is the following:
1. Create a master record with detail records at the same time.
2. Delete a master record
3. Add and remove detail records
An insert into the detail block is nothing more than associating a master record with a detail record by updating the sf_id column in table two. A delete from the detail block is nothing more than setting the sf_id column to null in table two. I am not actually adding or removing records in table_two.
I have tried overriding the commit on the second block to perform updates instead of Oracle actually trying to insert NEW records into table_two.
View 2 Replies
View Related
Mar 27, 2010
I'm designing a canvas which will open up on the click of a push-button from a form A. Now this form A has a data block(ie. single underlying table A).
I want to display data from two tables - Table B and Table C in this canvas in the form of a multi-record grid structure - one below the other i.e. table B data above and table C data below.
Now table B and table C share a PK-FK relnship between them. What I want is when a user clicks on a record in the table B above then the corresponding records in the table C should get displayed below(now there can be multiple detail records in table C for a single record in table B - PK-FK reln)
i'd written code something like this in the When-button-pressed trigger:-
c_where_clause := ....(query from Form A)
set_block_property('block B',default,c_where_clause);
go_block('block B');
go_block('block C');
execute_query;
first_record;
(in addition to the above trigger, I have also included queries in the post-query trigger of the two tables B and C to get some data populated in the non-database fields in this canvas)
do i have to do add a piece of code to loop thru the records...like checking for last record,if not going to the next_record and so on for both the blocks?
View 1 Replies
View Related
Dec 20, 2012
can we use set_block_property to program to switch multiple relationships. for example
if true then use relationshipA
else relationshipB
end if;
View 9 Replies
View Related
May 14, 2010
I have data in a table which don't have parent child relation ship. Can I display the data in that table in hierarchical tree item in a form.
Is it a must that data should have parent child relationship to display them in hierarchical tree item in a form.
View 1 Replies
View Related
Oct 18, 2012
I want to know how many managers have employees under him?
I mean to say one manager may have multiple employees from employees table.
View 7 Replies
View Related
Mar 7, 2013
I have one RDBMS concept question.if i have 2 tables with 0 to many realtionship. can i create referential integrity constraint between them?
In other words how can i tell whether the records in table A(child table) are not orphan records and have 0 to many relationship with table B(parent table) ? Right not there is no constraint defined on both tables.
View 3 Replies
View Related
Apr 29, 2011
I've a table (RelationshipX) with two columns with following values. The table represents the relationships. When I run the following query, It will give me all the combination of relationships...however, I need to get 15 unique as defined below.
Col1Col2
1106011060
1106011640
1106011142
1106011095
1106013029
1106014058
I run the following query to get below of all the combinaiton (note, I am opting out those six rows which matches to each other) select a.Col2 as Col1, b.Col2 as Col2 from RelationshipX a, RelationshipX b
where a.Col1 = 11060
and a.Col1=b.Col1
and a.Col2 <> b.Col2
order by Col1, Col2
[code]....
HOW can I modify my SQl so I get only 15 unique relationship records. (For example two UNDERLINE rows are technically same, and there are total 15 of them)???.
View 1 Replies
View Related
May 13, 2011
Just wanted to pose a question Can a (Unique and Not nullable)Alternate key of the parent table be part of child Table in an Identifying relationship i.e part of primary key of a child table????
Is there a rule that a primary keys of a parent table can be used to build a identifying relationship with its child?
View 1 Replies
View Related
Mar 6, 2011
Quote: Originally Posted by Silverj2k11
ALTER TABLE CONTRACT
ADD FOREIGN KEY (client_id)
REFERENCES client(client_id);
Didn't work! I am now losing my mind.
ORA-00904: "CLIENT": invalid identifier You do have a table named CLIENT?
View 7 Replies
View Related
Oct 11, 2013
I have been told to create a query which should give out the same output as the UI of an exception management application . However , many referenced tables have one to many relationship . I created a query using a function which was giving the required output . But the performance of the query was not good as for each row . Is there a method to create a select using joins to show one to many relationship in a table .
View 4 Replies
View Related
Feb 6, 2012
Would there be any problem / error when we import the dump file (which has parent table) on target database ?
View 11 Replies
View Related
Feb 24, 2007
the relationship on my script.What I want to do is make it possible to assign many courses to a student.But I have read a few books on foreign keys and primary keys, and I still dont get how to go on doing this....
This is how the table creation with the keys looks right now...
CREATE TABLE CAMPUS (
CAMPUSID NUMBER(4) NOT NULL,
NAME VARCHAR2(80) NOT NULL,
CONSTRAINT CAMPUS_PK PRIMARY KEY (CAMPUSID));
[code]...
View 3 Replies
View Related
Aug 8, 2011
I have a table called FAMILY which holda the data like , for father_gen_1 --->father_gen_2 --> father_gen_3 -- son.
father_gen_1 father_gen_2 father_gen_3 son
ABC XYZ GEF MNC
ABC lmn kth
I want to get the output which is a three column heirarical table and holds the parent child relationship Like following:-
id name parent_id
1 ABC NULL
2 XYZ 1
3 GEF 2
4 MNC 3
5 LMN 1
6 KTH 5
View 7 Replies
View Related
Mar 5, 2010
i'm trying to display the hierarchical relationship between the tables (parents-child-subchild).
[b]table structure[/b]
DEPT
|PK-DEPT_ID
|
EMP
|pk-EMP_ID
|fK emp_DEPT_fK((FK column is dept_id references dept table dept_id column))
[code]....
but by using below query i am not getting complete heirarichy.
SELECT LEVEL,
Table_Name,
Constraint_Name,
R_Constraint_Name ,
SYS_CONNECT_BY_PATH(Table_Name, '/') Path
[code]....
View 2 Replies
View Related
May 22, 2012
I have a DB that has one parent table with many child tables. I would like to delete all records(child - parent) based upon a particular "net_id". I have three versions that "seem" to work BUT I'd like to use "version2" because I want to go to the parent one time(for the parent delete I just made it simple for me) only and be able to delete the child record(s) from the child table(s). I want to achieve this w/o using triggers...
My question: Is version2 an "ok" way to delete child records or should I try another method(version1 or 3)??
create table PARENT
(
event_id NUMBER,
event_title VARCHAR2(50),
net_id VARCHAR2(16)
);
--truncate table parent;
insert into parent
(event_id, event_title, net_id)
values
(1, 'title1', 'CURLY');
[code]...
View 10 Replies
View Related
Jun 28, 2012
I was just wondering how is the relationship between MEMORY_TARGET and SGA_MAX_SIZE parameters, if exists any at all.I set my memory parameters as:
# Enable AMM
MEMORY_MAX_SIZE=10G
MEMORY_TARGET=4G
# Disable ASMM
SGA_TARGET=0
SGA_MAX_SIZE=0
So I bounce my instances and when I checked the parameter SGA_MAX_SIZE, Oracle automatically set a value of 2456M to it:
sga_max_size big integer 2456M
sga_target big integer 0
Reading MOS ID 443746.1, there is no clear mention about this relationship. It seems that Oracle automatically set SGA_MAX_SIZE as 60% of MEMORY_TARGET.
In am running Oracle 11gR2 (11.2.0.2.3) under Red Hat Linux.
View 10 Replies
View Related
Nov 16, 2012
I have a requirement like below
I have 3 tables (Prospect,customer,user) and I have a contact_dtls table .
In prospect table Prospect_id is the primary like this customer_id in customer table and user_id in the user table
in the contact_dtls table I have a column contact_id and other cols.The contact_id can be from prospect_id,customer_id and user_id in other words we can tell the prospect can be a contact or the customer can be a contact and the user also can be a contact also.
Now the question is "is it possible to maintain primary key and foreign key relationship with this design that means the prospect_id,customer_id and user_id would be the foreign keys to the contact_dtls table.
View 3 Replies
View Related
Apr 23, 2010
I have a table which uses parent-child relationship to store the options available. I need a procedure to give me the full path given the id of a particular option.
I have two different functions. One of them uses the Oracle built in function and the other uses simple queries with a loop.The code of the functions are given below.
Now, the problem is with their "performance". The difference in their performance is significant. The function using the Oracle function takes more than 2 hours to run a query whereas the other function takes less than 2 minutes.
I am having trouble trusting the other function. No matter how many tests I perform on the output of both the functions, it always comes out to be the same.
Function 1
=====================
FUNCTION Gettree (opt_id IN NUMBER,i_app_id IN NUMBER)
RETURN VARCHAR2
IS
path VARCHAR2(32767);
application_no NUMBER;
BEGIN
[code]...
View 2 Replies
View Related
Jan 4, 2012
I am working on a project, the insert statement is not functioning properly and I cannot find the error The error is in the insert statement for CustOrder. The error states that NULL cannot be inserted into CustOrder.CustID. I have declared CustID and its reference. I have looked over the code several times and I cannot find the problem.
If it makes a difference I am using APEX. The company has not database or program to work with a database so I am building everything from scratch.
declare
l_CustOrderID number;
l_CustID number := :P11_CustID;
begin
[code]....
View 25 Replies
View Related
Oct 3, 2010
Is there any relationship b/w tuning BUFFER CACHE and BUFFER BUSY WAITS?
1) Buffer Busy Waits are happening as the User process found the same Datablock is being used by another user in the BUFFER CACHE.
2) And also happens, when the server process found the same Datablock are being used in the Datafile.
View 5 Replies
View Related
Jul 14, 2011
Any utility that will take in a string and then search through multiple Oracle Forms and Reports modules (.fmb, .rdf, .mmb, .plx, etc). simultaneously to find which modules have strings that match the search criteria ?
To do this on an individual form is easy enough using the Oracle Forms Developer editor however I have over 100 Forms and reports.
I would like need a utility that will search all Oracle Forms in a given directory without having to actually open a Form(s) in the Oracle Forms Developer editor and then report which Forms may contained the sought after string.
View 7 Replies
View Related
Apr 26, 2011
OS: WinXP
Developer Suite 10g Rel.2
its a very basic query, i want to open multiple .fmb / .rdf files at once ( like pressing Shift or Ctrl key when selecting multiple files ), but its not allowing me
View 14 Replies
View Related
Oct 13, 2009
is there a way to keep the display of the form when we call another new form. my scenario will be as following:
am in form1 , i call form 2 from a menu, after this call form2 is open in place of form1.
i have no control in form1 and i can't change anything on it, i don't know hw the menu option is calling form2.the only control i have will be within form2 if there is any change i can make it.i read something about MDI, and OPEN_FORM() procedure, but i think this will required a change in form1 which i can't do.
is there any change i can make in form2 to display it and keep the display of form1 at the same time behind it ?
View 5 Replies
View Related
Nov 3, 2013
i have a table where there are two or more field which can be passed as parameters to filter rows or i can select all of the rows, how can i achieve this using where clause.
REATE TABLE OT_JOB_STAT ( JOB_NO VARCHAR2(12),JOB_STATUS VARCHAR2(12),JOB_EQUIP VARCHAR2(12),JOB_TYPE VARCHAR2(12))
insert into ot_job_stat ( JOB_NO ,JOB_STATUS ,JOB_EQUIP ,JOB_TYPE ) values ('0001','Open','CNC1','Prev')
insert into ot_job_stat ( JOB_NO ,JOB_STATUS ,JOB_EQUIP ,JOB_TYPE ) values ('0002','Close','CNC2','Brk')
select * from ot_job_stat where nvl(job_status) in ('Open') or nvl(job_status)='All' --All should bring both the records.
situation becomes more critical when there are more parameters.
select * from ot_job_stat where nvl(job_status,'X') in (:p_status) or nvl(job_status,'X')='All' and
nvl(Job_type,'X') in (:p_type) or Nvl(Job_status,'X')='All'
View 3 Replies
View Related
May 17, 2011
My query is: I have created a master-child forms on one canvas. In a child form i have to enter multiple records, but after entering every record its prompting me to save it. I want to avoid it and save the entire thing once all my records are entered.
View 4 Replies
View Related
Apr 16, 2010
how do I create multiple go_blocks
View 3 Replies
View Related
Feb 23, 2012
I'd want to select multiple records in my multi-record block. I'd also want to do that with checkboxes. When the user clicks on a particular checkbox, that should be selected and whatever record the user wants to check it should be added to selected records.
View 39 Replies
View Related
Feb 21, 2012
I need to compile multiple fmb files at once in FORMS6i.
View 1 Replies
View Related
Jun 3, 2013
how to save multiple records at once i did coding like this:
declare
cnt number;
l_rec number;
f_rec number;
begin
cnt := 0;
go_block('aan');
last_record;
l_rec := :system.cursor_record;
first_record;
[code]....
but this works as saving the last record only, not saving the all records.
View 4 Replies
View Related