Impossible to get a stable set of rows in the source tables

Hi guys,.

I use the following query to fusion in a stored procedure.
   MERGE INTO tt_OPEN_IN_TMP B
   Using (Select * From Tt_Sl_Fifo) A 
   ON ( A.Store_Code = B.Store_Code
     AND A.item_code = B.item_code
     And A.Packing = B.Packing
     And A.Serial_No = B.Serial_No )
   When Matched Then Update Set Opn_Fifo_Cost = A.Rate_Bc;
The procedure raises error * "Unable to get a stable set of rows in the source tables" * as a result of the query. But if I run the query individually, it works very well. Please help me solve this problem.

Thank you
RAM.

The error is due to what there is in double store_code, item_code, packaging, combination of serial_no in the Tt_Sl_Fifo table. If there are multiple records with the same store_code, item_code, packaging, serial_no Oracle has no way to determine which to use for the update. If you know that there is whenever duplicates they will all have the same column of rate_bc then instead of using

(select * from tt_sl_fifo)

use

(select distinct store_code, item_code, packing, serial_no, rate_bc from tt_sl_fifo)

Or if there is other criteria, like a date column, you can use to determine what is the one you want to use to day then you can use something like

(select store_code, item_code, packing, serial_no, rate_bc from tt_sl_fifo
  where (store_code, item_code, packing, serial_no, add_date) in
       (select store_code, item_code, packing, serial_no, max(add_date)
          from tt_sl_fifo group by store_code, item_code, packing, serial_no))

Tags: Database

Similar Questions

  • Using Merge in oracle 11g this error SQL Error: ORA-30926: failed to get a stable set of rows in the source tables

    whenever I run this code I get this error

    SQL Error: ORA-30926: failed to get a stable set of rows in the source tables

    30926 00000 - "impossible to get a stable set of rows in the source tables.

    * Cause: A stable set of rows could not be achieved due to the large dml

    activity or one not deterministic where clause.

    * Action: Remove any non deterministic of the clauses and reissue of the dml.

    Don't know wht goes wrong!


    SQL:

    MERGE IN VENDORS_ACTIVE_DATE s

    USING (nvl (d.VENDOR, s.VENDOR) selection of the SELLER,

    NVL (d.COMPANY_CODE, s.COMPANY_CODE) COMPANY_CODE.

    (case when ((d.VENDOR = s.VENDOR) and (d.COMPANY_CODE = s.COMPANY_CODE)))

    )

    then "MATCH".

    When d.COMPANY_CODE is null

    then 'DELETE '.

    When s.COMPANY_CODE is null

    then "INSERT."

    else 'UPDATE '.

    chck end)

    from (select * from VENDORS_ACTIVE_DATE where COMPANY_CODE = 2) s

    full outer join (select * provider where COMPANY_CODE = 2) d

    on (d.COMPANY_CODE = s.COMPANY_CODE AND s.COMPANY_CODE = 2)

    ) d

    WE (d.COMPANY_CODE = s.COMPANY_CODE AND d.chck in ('UPDATE', 'GAME', 'DELETE'))

    WHEN MATCHED THEN

    UPDATE SET s.VENDOR = d.VENDOR

    WHERE d.chck in ('UPDATE', 'DELETE')

    DELETE WHERE d.chck = 'DELETE '.

    WHEN NOT MATCHED THEN

    INSERT (SELLER, COMPANY_CODE)

    VALUES (d.VENDOR, d.COMPANY_CODE)

    Work request: (deleted the duplicate data in tables (source and target))

    MERGE IN VENDORS_ACTIVE_DATE s

    USING (nvl (d.VENDOR, s.VENDOR) selection of the SELLER,

    NVL (d.ACTIVEDATE, s.ACTIVEDATE) ACTIVEDATE.

    NVL (d.COMPANY_CODE, s.COMPANY_CODE) COMPANY_CODE.

    (case when ((d.VENDOR = s.VENDOR))

    - AND D.ACTIVEDATE = S.ACTIVEDATE

    and NVL (d.ACTIVEDATE, trunc (sysdate)) = NVL (s.ACTIVEDATE, trunc (sysdate))

    and (d.COMPANY_CODE = s.COMPANY_CODE)

    )

    then "MATCH".

    When d.COMPANY_CODE is null

    then 'DELETE '.

    When s.COMPANY_CODE is null

    then "INSERT."

    else 'UPDATE '.

    chck end)

    from (select * from suppliers where COMPANY_CODE = 2) d

    full outer join (select * from vendors_active_date where COMPANY_CODE = 2) s

    on (d.COMPANY_CODE = s.COMPANY_CODE and s.vendor = d.vendor)

    ) d

    WE (d.COMPANY_CODE = s.COMPANY_CODE AND d.VENDOR = s.VENDOR AND d.chck in ('UPDATE', 'GAME', 'DELETE'))

    WHEN MATCHED THEN

    S.ACTIVEDATE = UPDATE SET d.ACTIVEDATE

    WHERE d.chck in ('UPDATE', 'DELETE')

    DELETE WHERE d.chck = 'DELETE '.

    WHEN NOT MATCHED THEN

    INSERT (VENDOR, ACTIVEDATE, COMPANY_CODE)

    VALUES (d.VENDOR, d.ACTIVEDATE, d.COMPANY_CODE)

  • FUSION IN: ORA-30926: failed to get a stable set of rows in the source tables

    Hi all

    Database Oracle 12 c Enterprise Edition Release 12.1.0.1.0 - 64 bit Production 0

    PL/SQL Release 12.1.0.1.0 - Production 0

    CORE 12.1.0.1.0 Production 0

    AMT for 64-bit Windows: Version 12.1.0.1.0 - Production 0

    NLSRTL Version 12.1.0.1.0 - Production 0

    When you use the MERGE clause, if executed more than once, I get the below error

    ORA-30926: failed to get a stable set of rows in the source tables

    create table CBC (nums number, sname varchar2 (10))

    create tar (tnum number, tNom varchar2 (10)) table

    Insert in src values (1, 'a')

    Insert in src values (1, 'b')

    Insert in src values (2, "c")

    merge into tar

    using the CBC

    on (nums = tnum)

    when matched

    then

    update the value tNom = sname

    When not matched

    then

    Insert the values(snum,sname);

    What expect, it's that first time itself (when inserted), he must raise the error. But it's not.

    Select * from tar

    TNUM TNOM

    1 b

    1 a

    2 c

    But if we run for the second time it shows the error.

    I saw the document of the Oracle and he said

    MERGEis a deterministic statement. You cannot update the same row in the target table multiple times in the same MERGE statement.

    I've seen below cela son but failed to get the solution for this.

    MERGE STATEMENT ORA-30926: failed to get a stable set of lines in the source

    Nondeterministic fusion?

    Someone at - it make a clarification?

    I don't want to insert records into the first time itself. for example, to run the first time he must raise the error. can I do this using MERGE?

    Thank you

    Hello

    O - O wrote:

    Thanks knani, Frank.

    One more doubt.

    When you run the MERGE statement, the first time, there is no rows in the target table, so no rows in the target table is what it is.

    So we cannot perform below sqls using MERGE when the target table is empty?

    insert into tar values (1, 'a')

    updated tar tNom = 'b' set where tnum = 1

    insert into tar values (2, "c")

    Is - that means that the MERGER will be only works with validated data?

    Right; a MERGE statement will not update a line which has been previously inserted into the same MERGE statement.  All fact tables reference to the data in the tables by the time the MERGER began.

  • ORA-30926: failed to get a stable set of rows in the source table

    Dear all

    When I try to load my cube I get the error "ora-30926: failed to get a stable set of rows in the source table.
    Any idea? Googling for this error has not returned all the solutions.

    My env:

    Source: Oracle 10g (10.2.x)
    Target: Oracle 11g (11.1.0.7)

    I use the generator to warehouse 11.1.0.7 on Linux

    Thank you

    Hello

    Yes, I'm very sure. The error is revived by the MERGE statement.
    If the cube is empty, it is not a problem. All of the rows from the source Gets a surrogate key.
    If you run the cube for the second time, and you have two or more lines with exact in the attributes values as you use for correspondence, this error occurs.

    Kind regards
    Carsten.

  • MERGE or PL/SQL statement? (and ORA-30926: failed to get a stable set of rows in the source tables)

    Hi SQL & PL/SQL gurus...

    A bit of advice please...

    IM loading documents in the system... In this context, I have a routine that check the progress of loading (upload_records) against an existing table (supplier_records).  If the details differ so it updates, and if the folder does not exist, it inserts a new record...

    About 90% of the time, recording will be unchanged and the statement will do nothing...

    The challenge I have is that I get the error above fairly regularly, because (I think) there are simultaneous users, loading documents in the system... so, both tables change regularly...  The merge statement is below... but my question is: I would achieve anything by converting the merge statement into a PL/SQL loop that checks if the recordset contains a record that needs to either update or insertion? Would be the first simple quick check that reduction of 90% of the files works better, (with further processing if the folder must insert or update) and this would remove the error above, or the merge statement made the same thing anyway, and I should leave it as what? or is my incorrect merge statement and which contribute to the error?  The merge statement, if it finds a match, updates the record anyway, even if she didn't need to...  (which is not very effective)... However a pl/SQL loop will have to check if the record exists. check if it needs to be changed, change it if she does... Insert if the folder does not exist.

    MERGE statement is:

    MERGE INTO s suppliers

    USING (select distinct (sup_provision_id),

    provider,

    sup_acc_holder,

    sup_bank_acc,

    sup_bank_name,

    payments_upload sup_bank_branch

    where csv_id =: P20_CSV_ID) could

    WE (pu.sup_provision_id = s.supplier_id)

    WHEN MATCHED THEN

    GAME UPDATE

    s.SUPPLIER = pu.supplier,

    s.SUP_ACC_HOLDER = pu.sup_acc_holder,

    s.BANK_ACC_NO = pu.sup_bank_acc,

    s.BANK_NAME = pu.sup_bank_name,

    s.BRANCH_NO = pu.sup_bank_branch

    WHEN NOT MATCHED THEN

    INSERT (s.SUPPLIER_ID,

    s.SUPPLIER,

    s.SUP_ACC_HOLDER,

    s.BANK_ACC_NO,

    s.BANK_NAME,

    s.BRANCH_NO,

    s.CAT)

    VALUES (pu.sup_provision_id,

    able. Beg,

    Pu.sup_acc_holder,

    Pu.sup_bank_acc,

    Pu.sup_bank_name,

    Pu.sup_bank_branch,

    'S' );

    Thank you very much

    Richard

    Hi, Richard,.

    Richard Legge wrote:

    Hello.. Thanks for the reply...... The reason for the 'distinct' to ensure that the query retrieves only one line (based on the extraction of the full line, as you point out)... (so why he would never get more than one?) Well Yes... know that the media are not quite relevant...

    The reasoning is that out or 5000 records. 4000 will have the same provider... so want to retrieve a single record for what it (or other unique visitors who may be similar but have different criteria) and simply update the corresponding record, insert if there is no trace...

    Rgds

    Richard

    SELECT DISTINCT guarantees that no 2 rows will be exactly alike.  In other words, if you compare the 2 rows in the result set, either sup_provision_id supplier of GOLD supp_acc_holder for GOLD OR one of the other columns (or maybe 2 or more columns) will be different.  It does not guarantee that any 1 column will be unique.

    FUSION requires that, when a match is found, it should only be 1 line in the result set generated by the USING clause.  Given that the matching condition is

    WE (pu.sup_provision_id = s.supplier_id)

    This means that pu_sup_provision must be unique.  The ORA_30926 error occurs if it is not unique.  SELECT DISTINCT to ensure that complete lines in pu are unique, but it does not guarantee that any single column will be unique.

    Depending on your data and your needs, you may need to change the USING clause, so that sup_provision_id is unique.  You may need to add more conditions to the WHERE clause, or do a GROUP BY or use an analytic function such as ROW_NUMBER.

    If you need help, post a small example of data (that is, CREATE TABLE and INSERT statements for all the tables involved, as they are before the MERGER) and the exact results you want (that is, indicate which suppliers should contain after the MERGER).

    Check out the Forum FAQ: Re: 2. How can I ask a question on the forums?

  • ORA-30926: failed to get a stable set of rows in the source tables

    Hello

    Please suggest me I get the error message when running under code MERG. Please suggest

    Below the two tables are the same in the code not to structure no change that I just need to update the real table when data in the temporary table.

    MERGE WITH CEMLI_ASSESMENT CM

    USING (SELECT DISTINCT * FROM TEMP_CEMLI_ASSESMENT) TCM

    WE (CM.PRO_ID = TCM.PRO_ID AND)

    CM CEMLI_NAME THE GROUP TCM. CEMLI_NAME)

    WHEN MATCHED THEN

    GAME UPDATE

    CM CEMLI_TYPE THE GROUP TCM. CEMLI_TYPE,

    CM CEMLI_CODE_UNIT_EXEC THE GROUP TCM. CEMLI_CODE_UNIT_EXEC,

    CM LAST_USAGE_DT THE GROUP TCM. LAST_USAGE_DT,

    CM REQUIRED GROUP TCM. Mandatory

    CM.COMPLEXITY = TCM.COMPLEXITY,

    CM HIT THE GROUP TCM. AFFECTED,

    CM RE_DEVELOPMENT THE GROUP TCM. RE_DEVELOPMENT,

    CM IMPACT_DESC THE GROUP TCM. IMPACT_DESC,

    CM CEMLI_GROUP THE GROUP TCM. CEMLI_GROUP,

    CM REVISED_COMPLEXITY THE GROUP TCM. REVISED_COMPLEXITY,

    CM RETRO_PLANNED_START_DT THE GROUP TCM. RETRO_PLANNED_START_DT,

    CM RETRO_PLANNED_END_DT THE GROUP TCM. RETRO_PLANNED_END_DT,

    CM RETRO_ACTUAL_START_DT THE GROUP TCM. RETRO_ACTUAL_START_DT,

    CM RETRO_ACTUAL_END_DT THE GROUP TCM. RETRO_ACTUAL_END_DT,

    CM FUT_PLANNED_START_DT THE GROUP TCM. FUT_PLANNED_START_DT,

    CM FUT_PLANNED_END_DT THE GROUP TCM. FUT_PLANNED_END_DT,

    CM FUT_ACTUAL_START_DT THE GROUP TCM. FUT_ACTUAL_START_DT,

    CM FUT_ACTUAL_END_DT THE GROUP TCM. FUT_ACTUAL_END_DT,

    CM UPDATE_FLG THE GROUP TCM. UPDATE_FLG,

    CM.COMMENTS = TCM.COMMENTS

    WHEN NOT MATCHED THEN

    INSERT (CM.PRO_ID, CM. CEMLI_NAME, CM. CEMLI_TYPE, CM. CEMLI_CODE_UNIT_EXEC, CM. LAST_USAGE_DT, CM. IF NECESSARY, CM.COMPLEXITY, CM. HIT, CM. RE_DEVELOPMENT, CM. IMPACT_DESC, CM. CEMLI_GROUP, CM. REVISED_COMPLEXITY, CM. RETRO_PLANNED_START_DT, CM. RETRO_PLANNED_END_DT, CM. RETRO_ACTUAL_START_DT, CM. RETRO_ACTUAL_END_DT, CM. FUT_PLANNED_START_DT, CM. FUT_PLANNED_END_DT, CM. FUT_ACTUAL_START_DT, CM. FUT_ACTUAL_END_DT, CM. UPDATE_FLG, CM.COMMENTS)

    VALUES (TCM.PRO_ID, TCM. CEMLI_NAME, TCM. CEMLI_TYPE, TCM. CEMLI_CODE_UNIT_EXEC, TCM. LAST_USAGE_DT, TCM. IF NECESSARY, TCM.COMPLEXITY, TCM. HIT, TCM. RE_DEVELOPMENT, TCM. IMPACT_DESC, TCM. CEMLI_GROUP, TCM. REVISED_COMPLEXITY, TCM. RETRO_PLANNED_START_DT, TCM. RETRO_PLANNED_END_DT, TCM. RETRO_ACTUAL_START_DT, TCM. RETRO_ACTUAL_END_DT, TCM. FUT_PLANNED_START_DT, TCM. FUT_PLANNED_END_DT, TCM. FUT_ACTUAL_START_DT, TCM. FUT_ACTUAL_END_DT, TCM. UPDATE_FLG, TCM.COMMENTS);

    Thank you

    Shilpa

    This means that there are several lines in traditional Chinese with the same TCM.PRO_ID and TCM. CEMLI_NAME. And the MERGER cannot be updated same line several times. You must decide what to do in such cases. If you don't care which line of lines with the same TCM.PRO_ID and TCM. CEMLI_NAME to take, use:

    MERGE WITH CEMLI_ASSESMENT CM
    WITH THE HELP OF TCM (SELECT T.*, ROW_NUMER () OVER(PARTITION BY PRO_ID,CEMLI_NAME ORDER BY 1) RN TEMP_CEMLI_ASSESMENT T)
    WE (CM.PRO_ID = TCM.PRO_ID AND)
    CM CEMLI_NAME THE GROUP TCM. CEMLI_NAME AND
    TCM. RN = 1)
    WHEN MATCHED THEN
    GAME UPDATE
    CM CEMLI_TYPE THE GROUP TCM. CEMLI_TYPE,
    CM CEMLI_CODE_UNIT_EXEC THE GROUP TCM. CEMLI_CODE_UNIT_EXEC,
    CM LAST_USAGE_DT THE GROUP TCM. LAST_USAGE_DT,
    CM REQUIRED GROUP TCM. Mandatory
    CM.COMPLEXITY = TCM.COMPLEXITY,
    CM HIT THE GROUP TCM. AFFECTED,
    CM RE_DEVELOPMENT THE GROUP TCM. RE_DEVELOPMENT,
    CM IMPACT_DESC THE GROUP TCM. IMPACT_DESC,
    CM CEMLI_GROUP THE GROUP TCM. CEMLI_GROUP,
    CM REVISED_COMPLEXITY THE GROUP TCM. REVISED_COMPLEXITY,
    CM RETRO_PLANNED_START_DT THE GROUP TCM. RETRO_PLANNED_START_DT,
    CM RETRO_PLANNED_END_DT THE GROUP TCM. RETRO_PLANNED_END_DT,
    CM RETRO_ACTUAL_START_DT THE GROUP TCM. RETRO_ACTUAL_START_DT,
    CM RETRO_ACTUAL_END_DT THE GROUP TCM. RETRO_ACTUAL_END_DT,
    CM FUT_PLANNED_START_DT THE GROUP TCM. FUT_PLANNED_START_DT,
    CM FUT_PLANNED_END_DT THE GROUP TCM. FUT_PLANNED_END_DT,
    CM FUT_ACTUAL_START_DT THE GROUP TCM. FUT_ACTUAL_START_DT,
    CM FUT_ACTUAL_END_DT THE GROUP TCM. FUT_ACTUAL_END_DT,
    CM UPDATE_FLG THE GROUP TCM. UPDATE_FLG,
    CM.COMMENTS = TCM.COMMENTS

    SY.

  • Try to load Quick time. All goes well until I get "administrator has set policies that prohibit the installation of this program.

    original title: rules of the administrator

    Try to load Quick time.  All goes well until I get "administrator has set policies that prohibit the installation of this program.

    I am the system administrator, logged as such, can't find a way to change these policies of 'administratoer' to allow me to download and install a program that I want to install!

    Hi J1walters,

    ·        The computer is connected to a domain network?

    ·        Which edition of Windows vista is installed on the computer?

    ·        You are able to install other programs outside of Quicktime?

    However, you can try the steps below and check if it helps to install Quick time.

    Method 1

    a. open the location of the downloaded program.

    b. right click on Setup.exe or install icon.

    c. click the run as Administrator option.

    Check if the program is installed.

    Method 2

    Try to temporarily disable control user account (UAC) on the computer and try to install the program and check if he moved very well. Subsequently re-enable the UAC settings after installing the program.

    Access the link below to see how to enable and disable the UAC settings.

    http://Windows.Microsoft.com/en-us/Windows7/turn-user-account-control-on-or-off

    I hope this helps. Let us know the results.

    Thank you and best regards,

    Srinivas R

    Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Get the number of rows in the oracle table

    Hi all
    I want to get the total number of rows in the sql to the appmodule table.
    After you apply the criteria to view some on the view object. If he try with getallrowsinrange the number of rows found within the viewobject was but I want a total number of rows in the sql table.

    How can I get that

    I use jdev 11.1.1.5

    Thanks in advance

    I threw something together, quick and dirty, don't hesitate to optimize.

    Assuming you want the County table, I put the code in a subclass of EntityDefImpl since it is representing a table in the middle tier.

    public class EmpDefImpl
          extends EntityDefImpl {
      /**
       * This is the default constructor (do not remove).
       */
      public EmpDefImpl( ) {}
    
      //~ Methods ****************************************************************************
    
      public long getTableRowCount( DBTransaction transaction ) {
        String query = getQuery( );
        String countQuery = String.format( "SELECT COUNT(*) FROM (%s)", query );
        long count = 0;
    
        ViewObject vo = transaction.createViewObjectFromQueryStmt( countQuery );
    
        try {
          vo.executeQuery( );
    
          Row row = vo.first( );
          Number number = (Number)row.getAttribute( 0 );
          count = number.longValue( );
        } finally {
          vo.remove( );
        }
    
        return count;
      }
    }
    

    Depending on your card type, you may not get an oracle.jbo.domain.Number, but something else, so the cast may need correction.

    Usage example:

    public class EmpEditViewImpl extends ViewObjectImpl {
      public EmpEditViewImpl() {
      }
    
      protected void executeQueryForCollection( Object object, Object[] object2, int i ) {
        super.executeQueryForCollection( object, object2, i );
    
        EmpDefImpl def = ( EmpDefImpl )getEntityDef( 0 );
        long tableRowCount = def.getTableRowCount( getDBTransaction() ) );
    
        // Do something with it
      }
    }
    

    As you can see, the code is fairly generic. Also, you might be able to put this in a base extension ADF class.

    Sascha

    Published by: Sascha Herrmann on June 7, 2012 14:39

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

  • Compare two rows in the same table

    Hi all

    I need to compare two rows in the same table, I don't know hoe to do it in pl/sql. Please help me on this.

    example:

    price of ro TR
    xya0001 AMA.7 12
    xya0003 ama6 14
    xya0004 AMA.7 16

    in table b is a unique value for each line, I need to compare the price column and see if the first value is less than or greater than the following value and, if there is more to put the corresponding value of br to a variable, and if it is less, put the corresponding value of the br to another variable. I don't know a method to do this, as I'm new to pl/sql. Please help me in this
    for data in(select tr,br,price, lag(price) over ( order by tr) newcol
    from yourtable)
    loop
    if nvl(data.newcol,0) > data.price then
    variable1:=data.br;
    else
    varable2:=data.br;
    end if;
    end loop;
    
  • Rows from the outer Table shows only not all data.

    Hello

    I have a line to 80 characters that I import in an external table.

    80% imports fine line data, but some lines are cut.

    The bytes in the file are as follows.
    ABCABC2334 0000001000010000001000000001 000000 00001C A002

    Bytes in an external table.
    ABCABC2334 0000001000010000001000000001 000000 A002

    The bytes in the row of the outer table stop somewhere at the end of 000000 and the 00001C is cut.

    What build be the cause of this?

    I am able to read the characters at the beginning and towards the end of the record of 80-character line.

    The external file below performs the following operations.
    ABCABC2334 0000001000010000001000000001 000000 01B A002

    I can even make a definition of the external table (c1 char (1), c2 char (1),... c80 (1) tank and all the characters see fine in the specified columns.)

    Here is the last definition of the external table. The "middle" column still shows this behavior. Basically, it is in the file and can be seen with every character in the definined line, but not as a group of characters.

    DB CHARACTERSET WEBISO8859P1

    CREATE TABLE EXT_PROJ_1
    (
    Field1 tank (6 BYTES),
    Field2 float (4 BYTES),
    medium (67 BYTES)
    field3 tank (3 bytes),
    CR tank (2 bytes)
    )
    EXTERNAL ORGANIZATION
    (TYPE ORACLE_LOADER
    THE DEFAULT DIRECTORY EXP_DIR
    ACCESS SETTINGS
    (
    RECORDS delimited by '\r\n '.
    FIELDS (field1, position(1:6),
    position(7:10) Field2.
    average position(11:77)
    field3 position(78:80).
    CR position(81:82)
    )
    )
    LOCATION (EXP_DIR: 'ext_proj_1.txt')
    )
    REJECT THE LIMIT 1
    noPARALLEL
    NOMONITORING;

    Published by: 917320 on March 13, 2012 09:07

    Looking at your table definition:

    field1 char(6 BYTE),
    field2 char(4 BYTE),
    middle char(67 BYTE),
    field3 char(3 byte),
    cr char(2 byte)
    

    column in which you will store a string of 80 bytes?

    BTW: You said "import into an external table." You import FROM an external table or EXPORT to an external table?

  • How to set current row in the table after use the button tab on inputText

    Hi all
    My first post.., I am beginner in ADF and I'll try to explain my problem.

    For now we use ADF 11 g (11.1.1.4), in a jsff page I have a table with a column of inputText.
    On the the inputText valueChangeListener, I invoke a method in a bean viewScope that call an EJB method, make some services to the EJB on the modified line. After that, I update the VO and the table (because other values in the row have been changed) and reset the focus on the inputText even modified by the user with javaScript, because the focus was lost after updating.
    So far, everything works fine.

    When I use the arrow keys to change the selected line in the table, this is excellent work (focus is always in the inputText next or previous), but if the user tries the key tab allows you to change the current line, the inputText on the line that has the focus, but the current row in the table is not changed (I think that is normal).

    My question: How can I change the current line after the tab key in this case?

    I don't know if it is really clear, not easy to explain, do not hesitate to ask for more details.
    Thanks in advance.

    Hello

    My question: How can I change the current line after the tab key in this case?

    Use a client event to listen to the keyboard entry and intercept the tab. Use af:serverListener to call the server to set the rowKey on the table and deliver a PPR for the table to repaint

    See example 11 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples

    to learn more on how to use the client listener and the receiving server

    Frank

  • Popup lov (retrieves the filters and the first set of rows) returns the id

    Hello

    I have a problem when using a popup lov (retrieves the filters and the first set of rows). My LOV is a list of people posting their names, and it works very well when the popup opens. But in the "textfield" showing that you have chosen the corresponding id is displayed. This is not what I want. I want the name to be displayed.

    Any help would be greatly appreciated,

    Bram.

    Bram

    The text field is filled in with the return value.

    If you have

    SELECT name, id
    FROM table
    

    ID will be returned to the text field. If you want the name displayed, then it should be...

    SELECT name a, name b
    FROM table
    

    If you want to use the ID later, behind the scenes, then you could calculate it according to the name.

    See you soon

    Ben

  • Update of several rows of the same table using trigger

    Hello

    I have the following table

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

    CREATE TABLE ATT_PERMISSIONS
    (
    DATE OF PRMONTHYR,
    EMPIDNUMBER (10)DEFAULT VALUE 0,
    FROMDATETIMEDATE,
    TODMTFDATETIMEDATE,
    NUMBER OF PERMMINS (3),

    SSLINASTRETCH NUMBER (3).

    PERMATTINELIGIBLENUMBER (1)DEFAULT VALUE 0
    );

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

    I want to update the column PERMATTINELIGIBLE in the same table when each line is inserted.

    I created following trigger for that

    CREATE OR REPLACE TRIGGER SSL_AFTER_UPDATE AFTER UPDATE ON ATT_PERMISSIONS

    FOR EACH LINE

    BEGIN

    Update ATT_PERMISSIONS set PERMATTINELIGIBLE =

    (

    SELECT THE CHECK BOX

    WHEN PERMMINS < = 60

    or

    (

    PERMMINS < = SSLINASTRETCH

    AND

    COUNT (CASE WHEN PERMMINS = 0 THEN NULL OTHERWISE 1 END)

    COURSES (PARTITION BY empid, prmonthyr) < = 1

    )

    THEN 1

    0 OTHERWISE

    END

    FROM ATT_PERMISSIONS where prmonthyr =:new.prmonthyr, empid =:new.empid

    ) where prmonthyr =:new.prmonthyr, empid =:new.empid;

    END;

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

    That is to say.

    When a row is inserted the PERMATTINELIGIBLE of all records for this employee for the month is recalculated.

    There would be only two or three records for an employee for a month.

    PERMMINS is the number of minutes to use as short leave.

    If it is less than 60 is eligible for the bonus to attendance for this employee.

    If this isn't normally the date is not eligible for the attendance for this employee premium.

    but an exception is that if a short leaves of DISP employee allowed a month (IE. ( SSLINASTRETCH ) in a straight line, IE. one day, that day is eligible for the bonus of presence.

    That is to say. Why the number of short leaves in a month is taken. If it's one and done minutes use is lower to SSLINASTRETCH, then the day is eligible for the attendance bonus.

    But when I try to create the trigger I get error, PL/SQL: ORA-00907: missing a right parenthesis.

    Help, please

    I use oracle 10g

    I want to update the column PERMATTINELIGIBLE in the same table, when each row is inserted.

    No - you do NOT want to do in a trigger.

    You cannot query the same table that the trigger is activated on. -C' is a MUTANT and you will get an exception.

    When a row is inserted is recalculated to the PERMATTINELIGIBLE of all the records for that employee for that month.

    There would be only two or three records for an employee for a month.

    PERMMINS is the number of minutes to use as short leave.

    If it is less than 60 is eligible for the bonus to attendance for this employee.

    If is not normally the day is not eligible for the premium of attendance for this employee.

    but an exception is that if a short leaves of DISP employee allowed a month (IE. SSLINASTRETCH) in a straight line, IE. one day, that day is eligible for the bonus of presence.

    That is to say. Why the number of short leaves in a month is taken. If it's one and done minutes use is less than SSLINASTRETCH, then the day is eligible for the bonus of presence.

    But when I try to create the trigger I get error, PL/SQL: ORA-00907: missing a right parenthesis.

    You can not do in a trigger. Even if correct you this error of syntax, you will get the exception that I mentioned above.

    Oracle is a multi-user system. Other users can modify the same table that you use.

    So even if you could try to interview "all the records for this employee" some of them may be locked if other users access them. Also, an insert statement could try to insert two rows for an employee and the trigger could not have seen the other lines still.

    If you want to work with data SETS (all records for an employee), you must write the PL/SQL code that LOCKS all lines updated to prevent others to interfere.

    Then you make your operations but NOT in a trigger. Perform inserts and then use an UPDATE query to set this value.

    Then VALIDATE to unlock the lines.

  • Need a script to select the update the row to another row in the same table

    I have a table with the columns and values
    KeyID       EffectiveDate     InactiveDate
    1              01/01/2013
    1              01/02/2013
    1              01/03/2013
    2              12/31/2012
    2              01/02/2013
    2              01/03/2013
    I need to update the InactiveDate of a line with the EffectiveDate of a line with the EffectiveDate newer than the update line and the even KeyID.
    KeyID       EffectiveDate     InactiveDate
    1              01/01/2013      01/02/2013
    1              01/02/2013      01/03/2013
    1              01/03/2013
    2              12/31/2012      01/02/2013
    2              01/02/2013      01/03/2013
    2              01/03/2013
    I want to have a select script that shows
    KeyID       EffectiveDate        InactiveDate    New_InactiveDate
    1              01/01/2013                              01/02/2013
    1              01/02/2013                              01/03/2013
    1              01/03/2013
    2              12/31/2012                              01/02/2013
    2              01/02/2013                              01/03/2013
    2              01/03/2013
    Thanks for any help.

    Published by: 881656 on January 3, 2013 17:57

    Published by: 881656 on January 3, 2013 18:15

    Published by: 881656 on January 3, 2013 18:20

    Hello

    881656 wrote:
    I have a table with the columns and values

    KeyID       EffectiveDate     InactiveDate
    1              01/01/2013
    1              01/02/2013
    1              01/03/2013
    2              12/31/2012
    2              01/02/2013
    2              01/03/2013
    
    I need to update the InactiveDate of a row with the EffectiveDate of a row with the newer EffectiveDate than the row to be updated and with the same KeyID.
    
    KeyID       EffectiveDate     InactiveDate
    1              01/01/2013      01/02/2013
    1              01/02/2013      01/03/2013
    1              01/03/2013
    2              12/31/2012      01/02/2013
    2              01/02/2013      01/03/2013
    2              01/03/2013
    

    This sounds like a job for the analytical function of LEAD:

    MERGE INTO table_x     dst
    USING (
         SELECT  keyid
         ,     effectivedate
         ,     LEAD (effectivedate) OVER ( PARTITION BY  keyid
                                           ORDER BY         activedate
                                         )            AS inactivedate
          )               src
    WHEN MATCHED THEN UPDATE
    ON    (    src.id          = dst.id
          AND  src.effectivedate     = dst.effectivedate
          )
    SET     dst.inactivedate     = src.inactivedate
    ;
    
    I want to have a select script which shows
    
    KeyID       EffectiveDate        InactiveDate    New_InactiveDate
    1              01/01/2013                              01/02/2013
    1              01/02/2013                              01/03/2013
    1              01/03/2013
    2              12/31/2012                              01/02/2013
    2              01/02/2013                              01/03/2013
    2              01/03/2013
    

    Once that you have done the above MERGER, it is simply:

    SELECT    *
    FROM      table_x
    ORDER BY  keyid
    ,         effectivedate
    ;
    

    If you do not have sthe FUSION, then see the query in the USING clause of the MERGER.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
    In the case of a DML (UPDATE), for example, the sample data should show what looks like the tables before the DML, and the results will be the content of the table changed after the DML.
    Explain, using specific examples, how you get these results from these data.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

Maybe you are looking for

  • 39L4363D - cannot set the record time of beginning and end of filling time

    Hello I have a problem with my 39L4363DG tv (software 7.1.90.34.01.1). I'm not able time of filling time of beginning and end of record setting as described in the [Manual | http://www.toshiba-om.net/LCD/PDF/English/L4363-323950-English.pdf] on page

  • Tread boot

    Hi all I'm normally a guy talksoccer.net... but its good to talk to people for a change! I have a problem with a satellite pro A60 which I just returned from a long turn lent by someone who isn't a friend over! He said that one minute, the next minut

  • Remote panels and LabVIEW 2009

    Hello I updated my application PXI time real LabVIEW 2009 (Pro) and I'm now trying to connect with planels remote.  I can only have a remote panel open.  The other gives me the "connecting remote panels exceeds maximum number of licenses" the problem

  • HP Pavilion 22xi: HP Pavillion 22xi monitor tunrs itself after 1-3 minutes.

    Hello so I use my monitor for 1 year. It never happened until 9-10 months later when I played computer for like 10 hours. So my monitor turns off after 1-3 minutes. To activate it, I need only press the button. But its very annoying. I tried to switc

  • 15 port pins

    Does anyone know what I could use in the 15 Port pins on the side of my Presario CQ62 Notebook PC?