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.

Tags: Database

Similar Questions

  • Delete records based on the foreign keys of oracle 11 g

    I have a requirement to remove the records from the tables in the order according to

    the existing foreign keys.

    I for example, the following tables and the pk, fk constraints:

    create table one

    (aa number (1),)

    descr varchar2 (20));

    ALTER table one

    Add constraint a_pk key (aa) primary;

    create table b

    (aa number (1),)

    descr varchar2 (20));

    ALTER table b

    Add constraint b_pk key (aa) primary;

    create table c

    (aa number (1),)

    descr varchar2 (20));

    ALTER table c

    Add constraint c_pk key (aa) primary;

    create table a2

    (aa number (2),)

    id_aa number (1).

    descr varchar2 (20));

    ALTER table a2

    Add constraint a2_pk key (aa) primary;

    ALTER table a2

    Add constraint a2_fk foreign key (id_aa)

    references a (aa);

    create table b2

    (aa number (2),)

    id_aa number (1).

    descr varchar2 (20));

    ALTER table b2

    Add constraint b2_pk key (aa) primary;

    ALTER table b2

    Add constraint b2_fk foreign key (id_aa)

    references b (aa);

    create table z

    (aa number (3),)

    id_aa number (1).

    id_bb number (1).

    descr varchar (20));

    ALTER table z

    Add constraint z_pk key (aa) primary;

    ALTER table z

    Add constraint z_fk1 foreign key (id_aa)

    references a (aa);

    ALTER table z

    Add constraint z_fk2 foreign key (id_bb)

    references b (aa);

    So, I want to choose the names of the tables in such an order so as

    deleting records will succeed...

    I built the following sql query (using the recursive subquery factoring):

    [p]

    with q (r_constraint_name, table_name, constraint_name, lvl) as

    (select table_name, constraint_name, r_constraint_name 1 lvl

    from user_constraints one

    where a.constraint_type = 'P '.

    Union of all the

    Select b.table_name b.constraint_name, b.r_constraint_name, q.lvl + 1 lvl

    from user_constraints b

    Join q

    on (q.constraint_name = b.r_constraint_name)

    where b.constraint_type = 'R '.

    )

    Select f.table_name, f.constraint_name, f.r_constraint_name, f.lvl

    q f

    [/ p]

    I want the results as the following list:

    Table-name

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

    B2

    A2

    Z

    A

    B

    C

    The table - B2, A2, Z - (in any order) must first referred in the list

    because they are based on the other three tables - A, B, C. Thus, in order to remove the

    A, B, C table records the B2, A2, table Z records must be beleted first.

    The query I posted above has the problem that it displays tables A2, B2 twice

    (1 because they have a pk and 2 because they have fk referring A, B relatively tables).

    Is there a solution for this problem?

    Note: I use db11g v2

    I wrote not all relationships of tables user_constraints (only argument constraint_name = r_constraint_name)

    Thank you

    SIM

    I have a requirement to remove the records from the tables in the order according to

    the existing foreign keys.

    . . .

    The table - B2, A2, Z - (in any order) must first referred in the list

    because they are based on the other three tables - A, B, C. Thus, in order to remove the

    A, B, C table records the B2, A2, table Z records must be beleted first.

    Is there a solution for this problem?

    Yes - the 'solution' is to use ON DELETE CASCADE, as appropriate or write a procedure that removes tables in the proper order.

    The solution is NOT to try to use dynamic sql statements to do so.

    You already know the good parent/child relationships. Simply create a procedure that uses the correct order.

    Analyses are necessary in any case to determine the proper order AND press the appropriate values to use to remove the appropriate lines

    Your DDL for tables and constraints must be in a version control system

    Update the procedure when / if new constraints or tables are added to the application

    IMHO, you must use dynamic SQL NOT to try to adjust automatically if a new constraint appears. New constraints should not appear by accident - they appear ONLY as part of a well planned release.

  • I want to delete a row in the LOV table (in the context menu of JHS - LOV) but...

    Hi all
    JDeveloper: Studio Edition Version 11.1.2.2.0
    Jheadstart: 11.1.2.1.28
    I want to delete a row in the LOV table (in the context menu of JHS - LOV), but it removes the first line...
    Help, please

    Can,

    I was able to reporduce, this is a bug in LovPageBean.
    We will fix this with the next release, you can apply the following work around:

    -create a subclass of LovPageBean

    -replace the selectionListener following method:

    public void selectionListener (org.apache.myfaces.trinidad.event.SelectionEvent selectionEvent)
    {
    Object oldRowKey is getLovTable () .getRowKey ();.
    VR;
    {
    The selectedRows list = new ArrayList();
    setSelectedRowKeySet (getLovTable () .getSelectedRowKeys ());
    Iterator it = getSelectedRowKeySet () .iterator ();
    While (it.hasNext ())
    {
    List keyList = it.next () (list).
    getLovTable () .setRowKey (keyList);
    JUCtrlHierNodeBinding selectedRowData is getLovTable () .getRowData () (JUCtrlHierNodeBinding);.
    Line = selectedRowData.getRow ();
    If (! isMultiSelect())
    {
    make the current line, so removing line will operate in page LOV
    selectedRowData.getIteratorBinding () .getRowSetIterator () .getRowSet () .setCurrentRow (row);
    }
    selectedRows.add (new RowData (row));
    }
    If (isMultiSelect())
    {
    getLovItemBean () .setSelectedRowDataList (selectedRows);
    }
    on the other
    {
    If (selectedRows.size () > 0)
    {
    getLovItemBean () .setSelectedRowData (selectedRows.get (0));
    }
    on the other
    {
    getLovItemBean () .setSelectedRowData (null);
    }
    }
    }
    Finally
    {
    restore old line key
    getLovTable () .setRowKey (oldRowKey);
    }
    }

    -Conduct a custom template for the LovPageBean.vm to use your subclass.

    Steven Davelaar,
    Jheadstart team.

  • Inserting changes into an intermediate table rather than change the main table on a form.


    I am trying to create a process inserts changes the date in an intermediate table for approval, rather than change the main table.  I am currently using 4.2.4. Here's how I went on this subject.

    1. I've created a report interactive and connected the primary key on a form that displays data.
    2. Then I created a button called to request changes that redirects to another page with a form and through the necessary elements of session state.  (Note: I voluntarily created 2 different forms)
    3. I then set the initial values of the elements of the page on the current page based on the page, I went through the session state.

    My problem is that when changes are made and I hit the submit button, which is to send the page using an SQL Update statement, it does not have the intermediate table with new data.  I think it's because I set the source for the page elements as part of the page the previous page, thereby breaking the link to the database columns in my staging table.  Someone knows how to set the items on the form of page items I placed in another page without breaking the link to the database column?  Or is there an other/easier way to do this?

    Change that you attend the process instead of using APEX built DML, to call a specially written block that will take the page objects values and save them to your intermediate table...

    Thank you

    Tony Miller
    Software LuvMuffin
    Salt Lake City, UT

  • How to take partial dump using EXP/IMP in oracle only for the main tables

    Hi all

    select*from v$version;
    
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE    10.2.0.1.0    Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    

    I have about 500 huge data main tables in my database of pre production. I have an environment to test with the same structure of old masters. This test environment have already old copy of main tables production. I take the dump file from pre production environment with data from last week. old data from the main table are not necessary that these data are already available in my test environment. And also I don't need to take all the tables of pre production. only the main tables have to do with last week data.

    How can I take partial data masters pre prodcution database tables?  and how do I import only the new record in the test database.

    I use orders EXP and IMP. But I don't see the option to take partial data. Please advice.

    Hello

    For the first part of it - the paintings of masters just want to - use datapump with a request to just extract the tables - see example below (you're on v10, so it is possible)

    Oracle DBA Blog 2.0: expdp dynamic list of tables

    However - you should be able to get a list of master tables in a single select statement - is it possible?

    For the second part - are you able to qrite a query live each main table for you show the changed rows? If you can not write a query to do this, then you won't be able to use datapump to extract only changed lines.

    Normally I would just extract all the paintings of masters completely and refresh all...

    See you soon,.

    Rich

  • Chapter with Figures OCD does not end up in the main table of contents

    At the end of my document. I have a list of numbers. This list of figures has its name in my chapter paragraph Style. At the beginning of my document, I have a main table of contents. When I update the table of contents, list of figures chapter would end up in the main table of contents. Is there something I can do to fix that? I was thinking of a hidden layer with a second title of chapter for a list of Figures, but it's a hack. Is there a better way?

    I was able to get the table of contents to update correctly. I did two things, and I don't know which was the right one, or if you need to do both, but here's what worked:

    Export the list in the history of the figures to tagged text, and then disable Smart Rflow text and remove all executives who are in this thread, so history has completely disappeared from the file (but the pages are left behind). File > Place... and choose the story exported and auto-flow, then select those images and change the number of columns. Now, select and delete the existing text in the history of the table of contents (I left executives), then layout > TOC and regenerate.

  • data displayed only in the main table not shown in the child table

    I have two tables: master and child. In the main table, I want the first line of the main table must be selected and child records to be displayed when the page is displayed. But the page shows only the master records.

    The code written in the process in the controller application is:
    TheAM OAApplicationModule = pageContext.getApplicationModule (webBean);

    Table OATableBean = (OATableBean) webBean.findChildRecursive ("region1RN");
    Boolean ExecuteQuery = BooleanUtils.getBoolean (false);
    [Serializable] parameters = {executeQuery};
    Class [] paramTypes = {Boolean.class};

    theAM.invokeMethod ("init", parameters, paramTypes);

    the code written in AM is:
    public void init (Boolean executeQuery)

    {


    TXN OADBTransaction = getOADBTransaction();
    MTHSustainAspectsVOImpl vo = this.getMTHSustainAspectsVO1 ();

    Line masterRow = vo.first ();
    masterRow.setAttribute ("SelectFlag", "Y");
    vo.executeQuery ();


    }

    can someone tell me why the child records don't come

    Change the code as follows and try

    public void init (Boolean executeQuery)

    {

    TXN OADBTransaction = getOADBTransaction();
    MTHSustainAspectsVOImpl vo = this.getMTHSustainAspectsVO1 ();

    Line masterRow = vo.first ();
    masterRow.setAttribute ("SelectFlag", "Y");
    vo.executeQuery (); Not necessary
    vo.setCurrentRow (masterRow);

    }

    Prasanna-

  • ORA-39060: one or more tables has declined due to conflicts with the main table

    Dear all,

    Currently, I have problems, I try to import the entire schema

    bash - $3.2

    bash - $3.2 impdp dumpfile = PRODDUMP BALL/BALL_BALL@BALL. DMP DIRECTORY = DUMP_DIR FULL = Y LOGFILE = IMP Log REMAP_SCHEMA = BALL: BALL REMAP_TABLESPACE = BALLDATA:BALLDATA

    Import: Release 11.2.0.3.0 - Production the my Sep 30 15:28:08 2013

    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

    Connected to: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    With partitioning, Automatic Storage Management, Oracle Label Security, OLAP,.

    Options of Data Mining and Real Application Testing

    ORA-39060: one or more tables has declined due to conflicts with the main table

    UDI-31626: operation there was error ORACLE 31626

    ORA-31626: there is no job

    ORA-39086: cannot retrieve information about jobs

    ORA-06512: at "SYS." DBMS_DATAPUMP', line 3326

    ORA-06512: at "SYS." DBMS_DATAPUMP', line 4551

    ORA-06512: at line 1

    Any solution please

    Hello

    You can use the view:DBA_DATAPUMP_JOBS

    then use the table as drop statements

    drop table . purge;

    HTH

  • performance of the queries on the main tables of the materialized view vs

    Hello

    I'm afraid of strange behavior in db, on my paintings of master UDBMOVEMENT_ORIG (26mil.rows) and UDBIDENTDATA_ORIG (18mil.rows) is created the materialized view TMP_MS_UDB_MV (UDBMOVEMENT stands for this object) that meets certain default conditions and the join on these paintings of master condition. MV got on the lines of 12milions. I created MV for poll not so huge objects, MV got 3GB, paintings of master toghether 12 GB. But I don't understand that physical reads and becomes compatible is less on MV that on the main tables, the final execution time is shorter on the master tables. See my journal below.

    Why?

    Thanks for the replies.


    SQL > set echo on
    SQL > @flush
    SQL > alter system flush buffer_cache;

    Modified system.

    Elapsed time: 00:00:00.20
    SQL > alter system flush shared_pool;

    Modified system.

    Elapsed time: 00:00:00.65
    SQL > SELECT
    UDBMovement.zIdDevice 2, UDBMovement.sDevice, UDBMovement.zIdLocal, UDBMovement.sComputer, UDBMovement.tActionTime, UDBIdentData.sCardSubType, UDBIdentData.sCardType, UDBMovement.cEpan, UDBMovement.cText, UDBMovement.lArtRef, UDBMovement.sArtClassRef, UDBMovement.lSequenz, UDBMovement.sTransMark, UDBMovement.lBlock, UDBMovement.sTransType, UDBMovement.lGlobalID, UDBMovement.sFacility, UDBIdentData.sCardClass, UDBMovement.lSingleAmount, UDBMovement.sVAT, UDBMovement.lVATTot, UDBIdentData.tTarifTimeStart, UDBIdentData.tTarifTimeEnd, UDBIdentData.cLicensePlate, UDBIdentData.lMoneyValue, UDBIdentData.lPointValue, UDBIdentData.lTimeValue, UDBIdentData.tProdTime, UDBIdentData.tExpireDate
    UDBMOVEMENT_orig UDBMovement 3, Udbidentdata_orig UDBIdentData
    4. WHERE
    5 UDBMovement.lGlobalId = UDBIdentData.lGlobalRef (+) AND UDBMovement.sComputer = UDBIdentData.sComputer (+)
    6 AND UDBMovement.sTransType > 0 AND UDBMovement.sDevice < 1000 AND UDBMovement.sDevice > = 0 AND UDBIdentData.sCardType IN (2) AND (bitand(UDBMovement.sSaleFlag,1) = 0 AND bitand(UDBMovement.sSaleFlag,4) = 0) AND UDBMovement.sArtClassRef < 100
    7 AND UDBMovement.tActionTime > = TO_DATE (May 5, 2011 00:00:00 ',' dd/mm/yyyy hh24:mi:ss') + 0.25 AND UDBMovement.tActionTime < TO_DATE (May 5, 2011 00:00:00 ',' dd/mm/yyyy hh24:mi:ss') + 0.5
    8 ORDER BY tActionTime, lBlock, lSequenz;

    4947 selected lines.

    Elapsed time: 00:00:15.84

    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 1768406139

    ------------------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | TempSpc | Cost (% CPU). Time |
    ------------------------------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 7166 | 1238K | 20670 (1) | 00:04:09 |
    | 1. SORT ORDER BY | 7166 | 1238K | 1480K | 20670 (1) | 00:04:09 |
    | 2. NESTED LOOPS |
    | 3. NESTED LOOPS | 7166 | 1238K | 20388 (1) | 00:04:05 |
    |* 4 | TABLE ACCESS BY INDEX ROWID | UDBMOVEMENT_ORIG | 7142 | 809K | 7056 (1) | 00:01:25 |
    |* 5 | INDEX RANGE SCAN | IDX_UDBMOVARTICLE | 10709. 61 (0) | 00:00:01 |
    |* 6 | INDEX UNIQUE SCAN | UDBIDENTDATA_PRIM | 1 | | | 1 (0) | 00:00:01 |
    |* 7 | TABLE ACCESS BY INDEX ROWID | UDBIDENTDATA_ORIG | 1. 61. 2 (0) | 00:00:01 |
    ------------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    4 - filter("UDBMOVEMENT".") STRANSTYPE"> 0 AND 'UDBMOVEMENT '. "" SDEVICE ' < 1000 AND
    BITAND ("SSALEFLAG", 1) = 0 AND "UDBMOVEMENT". "" SDEVICE ' > = 0 AND BITAND ("UDBMOVEMENT". "SSALEFLAG «(, 4) = 0)" "
    5 - access("UDBMOVEMENT".") TACTIONTIME' > = TO_DATE (' 2011-05-05 06:00 ',' syyyy-mm-jj)
    ('HH24:mi:SS) AND "UDBMOVEMENT". "' TACTIONTIME ', TO_DATE (' 2011-05-05 12:00 ',' syyyy-mm-jj)
    ('HH24:mi:SS) AND "UDBMOVEMENT". ("' SARTCLASSREF" < 100)
    filter ("UDBMOVEMENT". "SARTCLASSREF" < 100)
    6 - access("UDBMOVEMENT".") LGLOBALID "=" UDBIDENTDATA. " "" LGLOBALREF "AND
    'UDBMOVEMENT '. "' SCOMPUTER"="UDBIDENTDATA." ("' SCOMPUTER")
    7 - filter("UDBIDENTDATA".") SCARDTYPE "= 2)


    Statistics
    ----------------------------------------------------------
    543 recursive calls
    0 db block Gets
    84383 compatible Gets
    4485 physical reads
    0 redo size
    533990 bytes sent via SQL * Net to client
    3953 bytes received via SQL * Net from client
    331 SQL * Net back and forth to and from the client
    kinds of 86 (memory)
    0 sorts (disk)
    4947 lines processed

    SQL > @flush
    SQL > alter system flush buffer_cache;

    Modified system.

    Elapsed time: 00:00:00.12
    SQL > alter system flush shared_pool;

    Modified system.

    Elapsed time: 00:00:00.74
    SQL > SELECT UDBMovement.zIdDevice, UDBMovement.sDevice, UDBMovement.zIdLocal, UDBMovement.sComputer, UDBMovement.tActionTime, UDBMovement.sCardSubType, UDBMovement.sCardType, UDBMovement.cEpan, UDBMovement.cText, UDBMovement.lArtRef, UDBMovement.sArtClassRef, UDBMovement.lSequenz, UDBMovement.sTransMark, UDBMovement.lBlock, UDBMovement.sTransType, UDBMovement.lGlobalID, UDBMovement.sFacility, UDBMovement.sCardClass, UDBMovement.lSingleAmount, UDBMovement.sVAT, UDBMovement.lVATTot, UDBMovement.tTarifTimeStart, UDBMovement.tTarifTimeEnd, UDBMovement.cLicensePlate, UDBMovement.lMoneyValue, UDBMovement.lPointValue, UDBMovement.lTimeValue, UDBMovement.tProdTime
    2. OF UDBMOVEMENT WHERE
    3 UDBMovement.sTransType > 0 AND UDBMovement.sDevice < 1000 AND UDBMovement.sDevice > = 0 AND UDBMovement.sCardType IN (2) AND (bitand(UDBMovement.sSaleFlag,1) = 0 AND bitand(UDBMovement.sSaleFlag,4) = 0) AND UDBMovement.sArtClassRef < 100
    4. AND UDBMovement.tActionTime > = TO_DATE (May 5, 2011 00:00:00 ',' the hh24: mi: ss' dd/mm/yyyy) + 0.25
    5 AND UDBMovement.tActionTime < TO_DATE (May 5, 2011 00:00:00 ',' the hh24: mi: ss' dd/mm/yyyy) + 0.5 ORDER BY tActionTime, lBlock, lSequenz;

    4947 selected lines.

    Elapsed time: 00:00:26.46

    Execution plan
    ----------------------------------------------------------
    Hash value of plan: 3648898312

    -----------------------------------------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    -----------------------------------------------------------------------------------------------------------
    | 0 | SELECT STATEMENT | 2720 | 443K | 2812 (1) | 00:00:34 |
    | 1. SORT ORDER BY | 2720 | 443K | 2812 (1) | 00:00:34 |
    |* 2 | MAT_VIEW ACCESS BY INDEX ROWID | TMP_MS_UDB_MV | 2720 | 443K | 2811 (1) | 00:00:34 |
    |* 3 | INDEX RANGE SCAN | EEETMP_MS_ACTTIMEDEVICE | 2732 | 89 (0) | 00:00:02 |
    -----------------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):
    ---------------------------------------------------

    2 - filter("UDBMOVEMENT".") STRANSTYPE"> 0 AND BITAND ("UDBMOVEMENT". "SSALEFLAG «(, 4) = 0 AND" "
    BITAND ("SSALEFLAG", 1) = 0 AND "UDBMOVEMENT". ("' SARTCLASSREF" < 100)
    3 - access("UDBMOVEMENT".") TACTIONTIME' > = TO_DATE (' 2011-05-05 06:00 ',' syyyy-mm-jj)
    ('HH24:mi:SS) AND "UDBMOVEMENT". "" SDEVICE ' > = 0 AND "UDBMOVEMENT". ' SCARDTYPE ' = 2 AND ".
    'UDBMOVEMENT '. "" TACTIONTIME "< TO_DATE(' 2011-05-05 12:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
    'UDBMOVEMENT '. ("' SDEVICE ' < 1000)
    filter ("UDBMOVEMENT". "SCARDTYPE"= 2 AND "UDBMOVEMENT"." SDEVICE' < 1000 AND
    'UDBMOVEMENT '. ("' SDEVICE ' > = 0)


    Statistics
    ----------------------------------------------------------
    449 recursive calls
    0 db block Gets
    6090 gets coherent
    2837 physical reads
    0 redo size
    531987 bytes sent via SQL * Net to client
    3953 bytes received via SQL * Net from client
    331 SQL * Net back and forth to and from the client
    168 sorts (memory)
    0 sorts (disk)
    4947 lines processed

    SQL > spool off

    Published by: MattSk on February 4, 2013 14:20

    >
    The second query makes a full table of materialized view scan.
    >
    What you base that statement on?

    I do not see any table full scan in terms of the second query. All I see is
    >
    * 2 MAT_VIEW ACCESS BY INDEX ROWID TMP_MS_UDB_MV 2720 443K 2811 (1) 00:00:34

  • ADF: Useless refresh of the main table in the master page layout / detail

    Hello

    I have a master page layout / detail (main table, long form). Whenever I change the focus of one main line to another (for example from the first to the second row), updating of the main table together. The 'new' line has already been read before it gets focus, in order to make a refresh seems completely unnecessary. Is it possible to change this behavior?

    Kind regards

    Andreas

    Hello

    Check in pageDef for entry ChangeEventPolicy = 'ppr' for your iterator entries... If so just remove it...

    Kind regards
    Suganth.G

  • [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

  • Retention of records based on the end of the calendar year

    Content using WebCenter 11 g and Records Management, I'm looking for a way to create a rule of provision based on the end of a calendar year.  For example, the rule might wait two years after the end of the calendar year in which the content item has been published.  Does anyone know how to do this?  I'm looking for something that is easy to maintain, but right now my best option is to create a metadata field to end of calendar year and then do a little iDoc script to set point which is archived for each content.  I would really like to avoid this if possible.  Any ideas?

    I think what you're trying to do is to "synchronize on the period start date.  It is part of the definition of the trigger.

    http://docs.oracle.com/cd/E21764_01/doc.1111/e10640/e01_interface.htm#RMDSG620.

    Assuming that the trigger is based on the release date:

    -An item is activated in June 30, 2016.

    -After the date of recording, wait two years.  This makes the eligible trigger on June 30, 2018.

    - But you want to wait until the end of 2018 to make available.

    -Check the above mentioned framework would force alienation to fire on January 1, 2019, instead of June 30, 2018.

  • Poller DB to select records based on the timestamp

    Hi all

    I want select records from the coloumn timestamp where the timestamp is older than an hour. Is it possible to do this through poller db? I tried but unable to pass the dynamic value (currently - 1 hr)

    Thanks in advance!

    Eventually create a view based on the timestamp and singled out the dbpoller view.

  • Web Forms: Deleting line based on the value of a specific column

    Hello

    I have an online form in which I want to apply delete missing on the ranks, but only on the value of the first column. So, if the first column is #missing I want the deleted row, even if the columns are given in it.

    Is it possible to do this?

    I'm on ver 11.1.2.2 Hyperion Planning

    Shehzad

    Published by: shehzad k on January 24, 2013 11:51

    Unfortunately, no. There is no way to add the delete line based SOLELY on the existence of a value in the first column. It would be nice to see some of the more advanced features "conditional delete", we en flies over to the planning of the entry forms.

    You can do the "clumsy" things with data validations where you gray - out ranks in view of the existence of a value in a particular cell, however while this might SUGGEST that the user should not enter data in a particular line, it would not PREVENT to do so.

    We have seen many improvements in form lately with the introduction of data validations. I hope the momentum continues.

    -Jake

  • Query - remove duplicate records, based on the value of a field

    Hello


    Please view the information below,
    How to delete records when his number 0
    AND these records (name) repeat with count > 0
    existing data
    
     name                       loc                            count
    ------------------------------------------------------------------------
    
    aaa          a1          10
    aaa          a1          0
    bbb          b1          0
    ccc          c1          0
    dcc          d1          11
    dcc          d1          0
    
    required output
    
    ---------
    
    
     name                       loc                            count
    ------------------------------------------------------------------------
    
    aaa          a1          10
    bbb          b1          0
    ccc          c1          0
    dcc          d1          11
    
    
    
    remove these records -
    
    -----------
    
    aaa          a1          0
    dcc          d1          0
    Thank you.

    I guess that loc always matches the name. Thus, to find the lines of stay is just a simple group of

    with data as(
    select 'aaa' name,'a1' loc,10 count from dual union all
    select 'aaa','a1',0 from dual union all
    select 'bbb','b1',0 from dual union all
    select 'ccc','c1',0 from dual union all
    select 'dcc','d1',11 from dual union all
    select 'dcc','d1',0 from dual )
    
    select
      name
    , loc
    , max(count) cnt
    from data
    group by
      name
    , loc
    order by
      name
    , loc
    
    NAME     LOC     CNT
    aaa     a1     10
    bbb     b1     0
    ccc     c1     0
    dcc     d1     11
    

    to find that the other is just a minus

    with data as(
    select 'aaa' name,'a1' loc,10 count from dual union all
    select 'aaa','a1',0 from dual union all
    select 'bbb','b1',0 from dual union all
    select 'ccc','c1',0 from dual union all
    select 'dcc','d1',11 from dual union all
    select 'dcc','d1',0 from dual )
    
    select name,loc,count from data
    minus
    select
      name
    , loc
    , max(count) cnt
    from data
    group by
      name
    , loc
    order by
      name
    , loc
    
    NAME     LOC     COUNT
    aaa     a1     0
    dcc     d1     0
    

    would be a delete

    delete from data
    where
    (name,loc,count)
    in
    (select name,loc,count from data
    minus ..
    

    concerning

Maybe you are looking for