update status main table based on the table of detail

Hello
using Jdev11.3
I have the following problem:
table main ServiceCall with attr (id, createdBy, status), or by status (running, closed)
table ServiceCallDetails of detail with attr (id, serviceCallId, Statuc) who are status (running, closed)

the requirment is to update the status in Master table to be closed if and only if all the Status in detail are closed.

I try to achieve this by implementation method in EntityImpl to get accessor lines but I can't.

any help
Thankx

You can try to use something like this:

RowSetIterator it = getViewObject () .createRowSetIterator (null);
IT. Reset();
While (it.hasNext ()) {}
your logic
}
it.closeRowSetIterator)

Tags: Java

Similar Questions

  • Update status of appointment based on the end time

    Is it possible to automatically update the appointment as "Completed" status when it exceeds the end time or the next day of the end time.

    Users does not change the State and most of the State of the appointment system shows it as being 'In progress' in the elements of completed activity.

    Thank you!

    I guess it's possible in R17 using time based workflow.

    Edited by: @$m! March 10, 2010 16:07

    Edited by: @$m! March 10, 2010 16:09

  • I have two main table and details

    Hi all

    I have the detail and mastery of two tables
    desc invoice_master
     ID                                        NOT NULL VARCHAR2(20)
     SALE_ORDER_NO                                      VARCHAR2(50)
     SEASON                                             VARCHAR2(30)
     CUSTOMER_NAME                                      VARCHAR2(300)
     DISPATCH_DATE                                      DATE
    INVOICE_NOTE_DATE
    
    desc invoice_detail
    ID                                                 VARCHAR2(20)
    PROD_ID                                            VARCHAR2(100)
    PROD_NAME                                          VARCHAR2(300)
    PRODUCT_COLOR                                      VARCHAR2(100)
     XS2                                                NUMBER
     S2                                                 NUMBER
     M2                                                 NUMBER
     L2                                                 NUMBER
     XL2                                                NUMBER
     PCS2                                               NUMBER
     TOTAL2                                             NUMBER
     UNIT_PRICE1                                        NUMBER
     UNIT_PRICE2                                        NUMBER
     TOTAL_PRICE1                                       NUMBER
     TOTAL_PRICE2                                       NUMBER
    I insert the data in a master-details three times on three different dates with the same sale_order_no
    I want a request to give me max data (invoice_note_date)

    Please guide
    Thanks vikas singhal

    Published by: vikas singhal on June 14, 2010 12:00

    You want to select data comes from the main table or the main table and details?
    If only the main table, use

    SELECT *
    FROM   invoice_master
    WHERE  invoice_master IN (SELECT MAX(INVOICE_NOTE_DATE)
                              FROM   invoice_master);
    

    SELECT *
    FROM   invoice_master
    WHERE INVOICE_NOTE_DATE IN (SELECT MAX(INVOICE_NOTE_DATE)
                              FROM   invoice_master);
    

    * 009 *.

    Published by: 009 on June 13, 2010 23:35

  • How to create a dependent list of values based on the relationship master detail

    Hello

    I'm on jdev 11.1.2.4.

    1. I have a table main 'Reception' with the columns receipt_id and student_id (ReceiptVO)

    2. as well as an array of details 'Receipt_Detail' with the columns receipt_id, course_id (ReceiptDetailVO)

    (There are some othere columns in the two tables, but I've only mentioned those which is relevant to this example.)

    3. the two tables are related with receipt_id.

    I want to create a dependent class LOV that filter courses related to the student selected in the main table. (There is a student_course table that holds student_id, relationship of course_id, StudentCourseVO)

    to do this, I have

    1 created VO based on the student_course table

    2 Add a view that filters based on the id of the student

    3 assigned this VO to receipt_detail tables course_id

    It comes

    in the accessor receipt_details VO view, I do not show the ability to select the student_id of the main table (IE ReceiptVO). It only shows the columns in the ReceiptDetailVO.

    Please can you help me?

    Thank you

    What you need in your ReceiptDetailVO is the StudentId of master ReceiptVO attribute.

    To do this, you can:

    1. for your ViewLink (between ReceiptVO and ReceiptDetailVO), you must generate the Source accessor:

    In this way, in the VoRowImpl Java to ReceiptDetailVO class, you will get a way to access master ReceiptVO line (you can find a new method with the name that you gave the name of the accessor in the top of the dialog box)

    2. then, in the ReceiptDetailVO, create Transient attribute, say, MasterStudentId. Access Java's VORowImpl class, within the get for this new attribute accessor method, use the previous step name accessor method to get the line main and finally master StudentId.

    3. the rest is easy - use this new attribute transitional to filter LOV about the student teacher ID...

  • Facebook Blackberry SDK; cannot update status or post it on the wall

    Good afternoon!

    I downloaded the most current Facebook-bb-sdk from SourceForge, but can't make it work.

    It seems to be ok sign, but I can't get any action edition in order to work. I installed the JARS as indicated in the readme.pdf, but the version that I downloaded does not include the sample application Strawberry and there seems to be no other downloads available. I, however, managed to find a project obsolete Stawberry, but it did not help (too old, maybe).

    In any case... Here is the code relavent which is attached to a button action:

    String NEXT_URL = "http://www.facebook.com/connect/login_success.html"; // also tried http://m.facebook.com/login.php
    String APPLICATION_ID = "my-application-id-is-here";
    String APPLICATION_SECRET = " my-secret-decoder-ring-code-is-here";
    String[] PERMISSIONS = Facebook.Permissions.USER_DATA_PERMISSIONS;
    ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
    Facebook fb = Facebook.getInstance(as);
    
    try {
    
       User user = fb.getCurrentUser();
       Dialog.inform("FB Name:" + user.getFirstName()); // this does indeed give me the correct authenticated user
       user.publishStatus("Hello world!"); // this does not publish my status update. boo
    
    } catch (FacebookException e1) {
    
        e1.printStackTrace();
        Dialog.inform(e1.toString());
    }
    

    As mentioned, login pages happens, I connect... and then I expect my status update to happen, but it never appears on my FB page. If I hit the button again, no login page shows (of course because I'm already authenticated), but no position shows no more. The dialog box I have arise watch the right user. I'm out of ideas.

    Any help is VERY appreciated. Thank you!

    Welcome to the forums!

    To start, you receive an exception when you try to post a new status? What a stack trace in your console?

  • Problem in the code to update a column value based on the value of a column

    Fusion by using item_TMP S points I have on (S.ITL_ITEM = I.ITEM_ITEM)
    When matched then
    game update
    S.ITL_UOM = I.ITEM_UOM;
    When not matched then null;

    Try

    update Item_TMP set ITL_UOM = (select ITEM_UOM from ITEMS
                                                     where Item_TMP_TMP.ITL_ITEM = ITEMS.ITEM_ITEM
                                                      and items.ITEM_UOM is not null )
    where ITL_ITEM in   (select  ITEMS.ITEM_ITEM from ITEMS
                                                     where items.ITEM_UOM is not null )
    /
    

    Cheers, APC

    blog: http://radiofreetooting.blogspot.com

  • master and details based on the business component

    Hello
    I am looking for sample Application main and based on the business component. How to build model and view to link knowledge please view this step by step thank you.

    Hello.

    This link contains many tutorials

    http://docs.Oracle.com/CD/E18941_01/tutorials/TOC.htm

    It's a good start:

    http://docs.Oracle.com/CD/E18941_01/tutorials/jdtut_11r2_55/jdtut_11r2_55_1.html

    Your version is 11.1.2.0.0?

  • [Help] Update status in the main table coloumn

    Hi guys,.

    He will be very grateful if someone can help me with my problem




    I am developing a booking using APEX system. I gave the design below details

    I have two tables where you one of them is a master of the table

    Master table (PK is ITEMID)

    Field - ItemId, ItemDetails, status

    SecondTable (HIST_Table) - a history of the booking (FK's ITEMID)
    Field - ItemId, username, Department, Dateout, Datereturn, Dateexpected


    I created a report and the form using APEX

    When the report is related to MasterTable


    and Insert (form) is connected to the HIST_Table.

    Question:

    How can I update the State field of the main table, which is connected to the report whenever an insert action takes place in the Insertform which is connected to HIST_Table?

    Looks like you might need a BEFORE INSERT trigger on your table, is an example here:

    http://www.java2s.com/Tutorial/Oracle/0560__Trigger/Changedatainabeforeinsertorupdatetrigger.htm

  • The Master Table column updated based on the sum of column Table detail


    With the help of JDev 11.1.1.6.

    I have a master-detail table based on a link to BC.

    The main table has a column that displays an InputText or an OutputText, based on the value in another column.

    If the InputText is displayed, the user can enter a value and the database will be updated with that value.

    If the OutputText is displayed, it must be a sum of a column in the secondary table.  Also, this value will be written in the database.

    Question:

    How can I fill the OutputText in the main table with the sum of the values in a column in the secondary table?

    The detail table column is a manually entered InputText field.

    Thank you.

    Create a spike in the main table and write in its expression as follows - DetailVoAccessorName.sum ("ColumnName");

    This will calculate the sum of column table detail and then you can set the value of the transient attribute to attribute DB on backup operation

    Ashish

  • How to update the password on the other table based on the mod

    Hello

    I need to update the password for the other table based on the mod.

    I have two table 'user' and 'reset '.


    User:

    Username username password date_exp

    s232322 Bobby John sdds4545df4r 10/12/2010
    s454566 George Bill f444556gh76 07/14/2010
    s343466 Bill Clinton fgf54tyujkkkhj 06/12/2011
    .
    .
    .


    Reset:

    Series encrypt decrypt

    fgf5656fg 0 Watellemon
    1 dfggf5665 lime juice
    dfdffd545 2 applesalad
    3 54r4gggt airlines
    construction of 4 hg44hh63
    5 fgf4343yh security
    .
    .
    .

    How can I update the password of a table to another table "reset"?

    Ex: query

    Update user set password = (select Encrypt reset where mod (length (username), 10))


    If mod (length (username), 10) is 0, it should take series "0" encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 1, it should take serial '1' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 2, it should take series '2' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 3, it should take series '3' encrypt the password and update the password in the table "user".
    If mod (length (username), 10) is 4, it should take series '4' encrypt the password and update the password in the table "user".
    ....


    Please help me write an update query.




    Thank you
    Nihar

    Hi, Nihar,

    You almost had it! You just need to correlate the subquery for the main UPDATE statement, like this:

    UPDATE     user_table     u     -- USER is a built-in function; it's not a good table name
    SET     password = ( SELECT  encrypt
                   FROM    reset     -- RESET isn't a very good table name, either
                   WHERE   serial     = MOD ( LENGTH (u.username)
                                             , 10
                                   )
                 );
    
  • Update based on the max value of different tables.

    {code}

    create the table rule_table (number rule_id);

    insert into rule_table values (10);

    insert into rule_table values (20);

    insert into rule_table values (30);

    insert into rule_table values (40);

    create the table auth_table (number of auth_id, rule_id number);

    insert into auth_table values (1000, 10);

    insert into auth_table values (2000, 10);

    insert into auth_table values (3000, 10);

    insert into auth_table values (4000, 20);

    insert into auth_table values (5000, 20);

    insert into auth_table values (6000, 30);

    insert into auth_table values (7000, 30);

    insert into auth_table values (8000, 40);

    insert into auth_table values (9000, 40);

    create the table pay_table (pay_id number, auth_id number, pay_indicator number);

    insert into pay_table values (11111, 1000, 0);

    insert into pay_table values (22222, 1000, 1);

    insert into pay_table values (33333, 1000, 0);

    insert into pay_table values (44444, 2000, 0);

    insert into pay_table values (55555, 2000, 1).

    insert into pay_table values (66666, 2000, 0);

    insert into pay_table values (77777, 3000, 0);

    insert into pay_table values (88888, 3000, 0);

    insert into pay_table values (99999, 4000, 0);

    insert into pay_table values (111111, 4000, 0);

    insert into pay_table values (222222, 5000, 0);

    insert into pay_table values (333333, 5000, 0);

    insert into pay_table values (444444, 6000, 0);

    insert into pay_table values (555555, 7000, 1);

    insert into pay_table values (666666, 8000, 0);

    insert into pay_table values (777777, 9000, 0);

    insert into pay_table values (888888, 9000, 1);

    create the table rule_pay (rule_id number, pay_max_indicator number);

    insert into rule_pay values (10, 0);

    insert into rule_pay (20, 0) values;

    insert into rule_pay (30, 0) values;

    insert into rule_pay (40, 0) values;

    {code}

    My intention is:

    for every find of rule_id on the maximum pay_indicator (tables 3 query to get the max Show pay_indicator below) and on the other table I have to update this value max based on rule_id.

    with max_tab

    as

    (

    Select a.rule_id, max (pay_indicator) pay_indicator

    rule_table a.,

    b auth_table,

    c pay_table

    where a.rule_id = b.rule_id

    and b.auth_id = c.auth_id

    A.rule_id group

    )

    Update rule_pay

    Set pay_max_indicator = (select max_tab.pay_indicator

    of max_tab

    where max_tab.rule_id = rule_pay.rule_id)

    where

    rule_id in (select rule_id from max_tab);

    The above query does not.

    Any help or suggestions are greatly appreciated.

    Something like that?

    SQL > select * from rule_pay;

    RULE_ID PAY_MAX_INDICATOR

    -------------------- --------------------

    10                    0

    20                    0

    30                    0

    40                    0

    SQL > fusion in rule_pay PR

    2. using (select a.rule_id, max (pay_indicator) pay_indicator

    rule_table 3A,

    auth_table 4 b,

    pay_table 5 c

    6 where a.rule_id = b.rule_id

    7 and b.auth_id = c.auth_id

    Group 8 by a.rule_id

    9        ) u

    10 on (u.rule_id = rp.rule_id)

    11 when matched, then update

    12 set rp.pay_max_indicator = u.pay_indicator

    13;

    4 lines merged.

    SQL > select * from rule_pay;

    RULE_ID PAY_MAX_INDICATOR

    -------------------- --------------------

    10                    1

    20                    0

    30                    1

    40                    1

    BTW, you can't put a WITH clause before an update.  It can only precede a select statement.

  • help on the use of dynamic action to update the items in a table (more precisely, the radio button) based on the collection

    Hi everyone, I posted this question in the past and made huge strides with the help of Denes Kubicek: https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365: based on my previous question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494

    I'm fighting with a single element in my tabular presentation.  There is a radio button.  The choices all seem correctly, but the value is not saved in the collection (and therefore not recorded in the table).  All the other elements in the form of tables to record properly.

    Here's what I have for the query.   This is element c024 (which maps to;) ("F03'), which is defined as a radio based on an existing LOV LOV.

    Currently I have:

    2 items on the page:

    P110_ID

    P110_VALUE

    Dynamic action called COLUMN of CHANGE:

    event: CHANGE

    selection type: jQUERY Selector

    jQuery:

    Select jQuery = input [name = "f03"], select [name "f08"], select [name = "f09"], input [name = 'f10'], input [name = 'f11'], input [name = 'f12'], select [name = "f40"], input [name = "f21"], input [name = 'f22'], input [name = "f23"], input [name = 'f50']

    scope of the event: Dynamics

    real action #1: set the P110_ID javascript expression this.triggeringElement.id

    real action #2: set the P110_VALUE javascript expression this.triggeringElement.value

    action 3: run pl/sql code

    declare
      v_member number;
      v_seq number;
    begin 
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    
    
    

    refreshment area true creation #4: LANDINGS_COLLECTION

    the tabular presentation is based on the query:

    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
     where collection_name = 'SPECIES_COLLECTION' order by seq_id
    
    
    
    
    
    

    I noticed the following:

    When I change the column C011 (price) the following values are defined in dynamic action:

    P110_ID = f11_1

    P110_VALUE is everything that I change the price.

    When I change the column C024 (hms_flag), the following values are defined:

    P110_ID = f03_0001

    P110_VALUE = change everything what I hms_flag to.

    the region is updated in my dynamic action, and change of hms_flag does not take.  I tested the SQL query that generates the value of v_SEQ in the dynamic action.   Both a change of price and HMS_FLAG, it seems valid

    Select ltrim (substr(:p110_ID,5,4),'0 ') in the double v_seq;

    If f11_1, v_seq: = 1

    If f03_0001, v_seq: = 1

    Thank you!

    solved.  sort of.

    domain c024 references f03.

    dynamic ACtion, step 4 calculated v_member as a substring of P110_ID... and in all other areas, the column and the field (fxx) displayed the same value... otherwise c024.

    I'm not exactly sure how solve it, but see the problem.

  • How update the column in the table based on the value selected in apex4.1

    Hi all
    I have the following tables,
    leave_type table,it has the following fields,
    1.emp_name,
    2.sick
    3.casual
    and it has the values as follows,
    emp_name                  sick             casual
    guru                           10                10
    mishra                         10                10
    leave_master table and it includes the following fields
    1.emp_name,
    2.leave_type
    3.no_of_days
    I have the form based on the table "leave_master"
    Here, the leave_type has the LOV which includes.
    sick and casual.

    When the form is filled out and clicked on the button submit,
    I need to update the column leave_type in table leave_type,
    for example,.
    if 
    emp_name:guru
    leave_type:sick
    no_of_days:3
    then I want to update the leave_type column,
    sick sick = - no_of_days for the 'guru' of name
    That is to say, ill = 10-3 = 7

    then the leave_type of the table must be,
    emp_name                       sick             casual
    guru                                 7                10
    mishra                              10               10
    someone can such me what code or method I can use?
    Thank you.

    Published by: Gurujothi on May 24, 2012 21:54

    Published by: Gurujothi on May 24, 2012 21:54

    Try something like this...

    BEGIN
    IF: PXX_LEAVE_TYPE = "Sick" THEN
    UPDATE LEAVE_TYPE
    THE PATIENT VALUE = SICK -: PXX_NO_OF_DAYS
    WHERE EMP_NAME =: PXX_EMP_NAME;
    ON THE OTHER
    UPDATE LEAVE_TYPE
    DEFINE CASUAL = CASUAL -: PXX_NO_OF_DAYS
    WHERE EMP_NAME =: PXX_EMP_NAME;
    END IF;
    COMMIT;
    END;

  • In the form of table-update a column based on the other

    Greetings,

    I want to update a column based on the value of another column in a tabular presentation. What should I use? Calculation or validation process?

    -Vatsa

    Yes, get rid of the update of "pims_component" - this is the cause of the error table mutation - and simply set

    : new.state_ind: = Ls_state;

    CITY

  • Deleting record based on the ID of the main table

    Hello
    SQL> desc news
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     NEWS_ID                                   NOT NULL NUMBER(14)
     NEWS_DATE                                          TIMESTAMP(0)
     SL_ID                                              NUMBER(2)
     HEADING                                            VARCHAR2(3120)
     DESCRIPTION                                        VARCHAR2(3900)
    
    SQL> desc news_location
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     NEWS_ID                                            NUMBER(14)
     COUNTRY                                            VARCHAR2(32)
     REGION                                             NUMBER(2)
    
    SQL> desc news_product
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     NEWS_ID                                            NUMBER(14)
     PRODUCT_CATEGORY_ID                       NOT NULL NUMBER(14)
     PRODUCT                                            VARCHAR2(27)
    
    SQL> desc news_service
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     NEWS_ID                                            NUMBER(14)
     SERVICE_ID                                NOT NULL NUMBER(14)
     SRVIS                                              VARCHAR2(16)
    
    SQL> desc news_info
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     NEWS_ID                                            NUMBER(14)
     SOURCE                                             VARCHAR2(203)
     ORIGIONAL_NEWS                                     VARCHAR2(3900)
     HEADING                                            VARCHAR2(3110)
    
    SQL> select count(*) from news where TO_CHAR(news_date,'YYYY') <  2012;
    
      COUNT(*)
    ----------
          8759
    I am trying to remove the news that are published before 2012, but the tables in detail consists the notebook of the child based on the news_id has been. Request certainly simple deletion will not work

    Please advise and thank you in advance

    Once again, I tell you, do not need ON DELETE CASCADE in the Delete query.

    Just use the Delete query like: -.

    delete from news where TO_CHAR(news_date,'YYYY') <  2008;
    

    And the child tables are deleted as a result.

Maybe you are looking for