tag:blogger.com,1999:blog-21122514.post7523203481875954802..comments2024-03-23T11:05:13.046+01:00Comments on Dimitri Gielis Blog (Oracle Application Express - APEX): Master Detail (-Detail) in APEXDimitri Gielishttp://www.blogger.com/profile/16295721159626839167noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-21122514.post-86235293524451589022017-03-13T18:26:09.312+01:002017-03-13T18:26:09.312+01:00Aravind,
I suppose the master-detail has similar ...Aravind, <br />I suppose the master-detail has similar behavior with tabular form. If true you can do it using joins for the tables. When applied with more than 3 tables it's possible to get the ORA 01445 error. You can use nested selects to workaround this.<br /><br />e.g.:<br /><br />select a.columns, b.columns, c.columns, d.columns from tableA a<br />inner join tableB b on a.pkey = b.pkey<br />inner join tableC c on b.pkey = c.pkey<br />where c.pkey in <br />(<br />select pkey from tableD inner join tableE e on pkey = e.pkey<br />) d<br /><br />where "conditions"...<br /><br /><br />gustavohttps://www.blogger.com/profile/00234334409850966752noreply@blogger.comtag:blogger.com,1999:blog-21122514.post-5372200495477812352017-03-13T11:56:36.564+01:002017-03-13T11:56:36.564+01:00Hello Dimitri,
Thanks for your answer. I solved it...Hello Dimitri,<br />Thanks for your answer. I solved it by adding a surrogate key for the intermediate/link table. This surrogate is populated using a trigger as you suggested. I think this surrogate key is useless, but if this helps APEX, then it's ok . Anonymoushttps://www.blogger.com/profile/05819523322226367455noreply@blogger.comtag:blogger.com,1999:blog-21122514.post-72534212001232199542017-03-13T07:43:48.374+01:002017-03-13T07:43:48.374+01:00hi Dimitri,
I want master details for...hi Dimitri,<br /> <br /> I want master details for multiple tables like 2 or 3 tables that shown in sigle page is it possible?Anonymoushttps://www.blogger.com/profile/09341193493488568174noreply@blogger.comtag:blogger.com,1999:blog-21122514.post-46318511243633934552017-02-24T22:36:41.927+01:002017-02-24T22:36:41.927+01:00Hi Dimitri,
Did you changed the query for detail ...Hi Dimitri,<br /><br />Did you changed the query for detail table? I have a similar situation with three tables, one of that receiving the foreign keys from tech_report and documents. <br />I want to attach documents on my tech_report(master). What I could make to refer it on detail querie, supposing It's return only the associative table?<br /><br />José Gustavogustavohttps://www.blogger.com/profile/00234334409850966752noreply@blogger.comtag:blogger.com,1999:blog-21122514.post-3412469559385406342017-02-01T21:04:26.422+01:002017-02-01T21:04:26.422+01:00Hi Gian,
You probably want to define a trigger to...Hi Gian,<br /><br />You probably want to define a trigger to fill that ID.<br />Here's an example:<br />--<br />CREATE SEQUENCE dimi_customer_SEQ start with 1;<br />CREATE OR REPLACE EDITIONABLE TRIGGER "BI_DIMI_CUSTOMER" <br /> before insert on "DIMI_CUSTOMER" <br /> for each row <br />begin <br /> if inserting then <br /> if :NEW."ID" is null then <br /> select dimi_customer_SEQ.nextval into :NEW."ID" from dual; <br /> end if; <br /> end if; <br />end;<br />/<br />--Dimitri Gielishttps://www.blogger.com/profile/16295721159626839167noreply@blogger.comtag:blogger.com,1999:blog-21122514.post-59241506508540985962017-02-01T16:10:01.984+01:002017-02-01T16:10:01.984+01:00Hello Dimitri,
I am quite new to APEX (using 4.2 c...Hello Dimitri,<br />I am quite new to APEX (using 4.2 currently) and I am not able to create a Master Detail form using the wizard. My iue is with the Detail FK not initialized. <br />So I was eager to see how you managed it using your example https://www.apexrnd.be/ords/f?p=DGIELIS_BLOG:MASTER_DETAIL <br />but after filling all fields clicking on Create button I get the same error as in my application: <br />•ORA-01400: cannot insert NULL into ("TRAINING"."DIMI_CUSTOMER"."ID")<br />Could you please tell me if I am doing something wrong ?<br />And would it be possible to get your code so I can understand how you populate the Detail FK.<br />Thanks,<br />GianAnonymoushttps://www.blogger.com/profile/00694600044883497618noreply@blogger.comtag:blogger.com,1999:blog-21122514.post-78822612088986802532015-01-15T21:11:48.303+01:002015-01-15T21:11:48.303+01:00hi Dimitri
how create master detail detail on sam...hi Dimitri<br /><br />how create master detail detail on same page ? houshmandhttps://www.blogger.com/profile/00589451883395782864noreply@blogger.com