Insert + 1.7976931348623155E308 in overflow digital column ORA-01426

I'm porting an application that used a large double value of Java (MAX - 1 d = + 1.7976931348623155E308) as a semaphore to indicate a condition. I can't understand how to set the column to accept this value without giving in to the error: ORA-01426: digital overflow. I tried various details of the FLOAT (upward through 126) and DOUBLE_PRECISION and BINARY_DOUBLE and tried a trigger to use TO_BINARY_DOUBLE - all have failed. I use 11g. DB2 accepts DOUBLE as a data type and treats this value.

--------------------------------------------------------
-The DOF for Table TEST (generated from specification BINARY_DOUBLE for COLUMN1)
--------------------------------------------------------

CREATE TABLE 'DB2ADMIN. "' TEST '.
("COLUMN1" BINARY_DOUBLE
) CREATION OF IMMEDIATE SEGMENT
PCTFREE, PCTUSED, INITRANS 40 10 1 MAXTRANS 255 NOCOMPRESS SLAUGHTER
STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS USER_TABLES DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT 1)
TABLESPACE 'SYSTEM '.

Insert test values (column1) (+ 1.7976931348623155E308);
ERROR on line 1:
ORA-01426: digital overflow

Try this:

insert into test (column1) values (to_binary_double('1.7976931348623155E308'));

Worked for me:

SQL> desc t
Name Type          Nullable Default Comments
---- ------------- -------- ------- --------
A    BINARY_DOUBLE Y                         

SQL> insert into t values ( to_binary_double('1.7976931348623155E308') );

1 row inserted

Published by: Marcus Rangel on sept 19, 2012 11:34

Tags: Database

Similar Questions

  • DAC 11.1.1.6.4 fails with the error cannot get columns: ORA-01403: no data found

    Hello

    We strive to run a full charge in DAC, but it is a failure.

    The S_ASSET table is empty and therefore, we get the error

    Could not get column: ORA-01403: no data found

    We were not facing this error in DAC 10 g but after upgrade to DCA 11 g, this task has no place if the array is empty. How remove this restriction and DAC will work perfectly even if the tables are empty to full charge?

    CAD DETAILS

    Console Administration Oracle BI DW

    CAD build a 11.1.1.6.4.20121119.2022 Build date: November 19, 2012

    Management Console to install, configure, and administer the Warehouse Analytics of Oracle Business

    Schema version - 47, Index version - 36, repository version - 6, data version Seed - 16

    INFORMATICA - VERSION9.0.1 HF2


    Here's the log of IMG_BUILD - S_ASSET when this task was running in DAC 10 g. The task facing any problem when S_ASSET table was empty.

    [code]

    2013-12-23 15:34:29.644 CHANGE CAPTURE: IMG_BUILD - internal S_ASSET began.

    the number of days of prunes: 4

    After change data capture: 2013-12-19 12:23:19.332 in full Mode.

    2013-12-23 15:34:29.69 - execution:

    TRUNCATE TABLE S_ETL_I_IMG_6

    2013-12-23 15:34:29.89 - executed successfully.

    2013-12-23 15:34:29.9 - execution:

    TRUNCATE TABLE S_ETL_R_IMG_6

    2013-12-23 15:34:30.145 - executed successfully.

    2013-12-23 15:34:30.16 - execution:

    TRUNCATE TABLE S_ETL_D_IMG_6

    2013-12-23 15:34:30.198 - executed successfully.

    2013-12-23 15:34:30.236 - execution:

    INSERT / * + APPEND * / INTO S_ETL_R_IMG_6

    (ROW_ID, MODIFICATION_NUM, LAST_UPD)

    SELECT

    ROW_ID

    MODIFICATION_NUM

    LAST_UPD

    Of

    S_ASSET

    WHERE

    LAST_UPD > TO_DATE ('2013-12-19 12:23:19 ',' ' YYYY-MM-DD HH24:MI:SS)

    2013-12-23 15:34:30.968 - executed successfully.

    2013 12-23 15:34:30.989 - execution of deleting duplicates rowid.

    2013-12-23 15:34:31.01 - successfully deleting duplicates rowid.

    2013-12-23 15:34:31.27 - execution:

    DROP VIEW V_ASSET

    2013-12-23 15:34:31.566 - executed successfully.

    2013-12-23 15:34:31.569 - execution:

    CREATE VIEW V_ASSET AS

    SELECT

    *

    Of

    S_ASSET

    2013-12-23 15:34:31.743 - executed successfully.

    2013-12-23 15:34:31.78 - execution:

    SELECT COUNT (*) IN S_ASSET

    The County is: 0

    Executed successfully: CHANGE CAPTURE: IMG_BUILD - internal S_ASSET

    (Number of attempts: 1).

    Executed orders:

    IMG_BUILD - internal

    2013-12-23 15:34:31.851 CHANGE CAPTURE: IMG_BUILD - internal S_ASSET has finished running with the completed state.

    The same task, IMG_BUILD - S_ASSET fails when it is running in DAC 11 g, because the table is empty. Here is the log for the failure of the task to 11g.

    [code]

    2013-12-27 21:21:47.497 acquisition of resources

    2013-12-27 21:22:20.33 acquired resources

    2013-12-27 21:22:20.787 CHANGE CAPTURE: IMG_BUILD - internal S_ASSET began.

    the number of days of plum: 5760

    After change data capture: 2013-12-23 21:19:19.233 in full Mode.

    21:22:21.211 2013-12-27 - execution:

    TRUNCATE TABLE S_ETL_I_IMG_6

    2013-12-27 21:22:22.384 - executed successfully.

    21:22:22.389 2013-12-27 - execution:

    TRUNCATE TABLE S_ETL_R_IMG_6

    2013-12-27 21:22:22.532 - executed successfully.

    21:22:22.534 2013-12-27 - execution:

    TRUNCATE TABLE S_ETL_D_IMG_6

    2013-12-27 21:22:22.546 - executed successfully.

    21:22:22.55 2013-12-27 - execution:

    INSERT / * + APPEND * / INTO S_ETL_R_IMG_6

    (ROW_ID, MODIFICATION_NUM, LAST_UPD)

    SELECT

    ROW_ID

    MODIFICATION_NUM

    LAST_UPD

    Of

    S_ASSET

    WHERE

    LAST_UPD > TO_DATE ('2013-12-23 21:19:19 ',' ' YYYY-MM-DD HH24:MI:SS)

    2013-12-27 21:22:22.614 - executed successfully.

    2013 12-27 21:22:22.616 - execution of deleting duplicates rowid.

    2013-12-27 21:22:24.72 - successfully deleting duplicates rowid.

    Could not get column: ORA-01403: no data found

    FAULT INFO: Error executing: CHANGE CAPTURE: IMG_BUILD - internal S_ASSET

    MESSAGE: com. Siebel.Analytics.etl.Execution.exceptions.ChangeCaptureTaskFailedException: Change Capture failed.

    EXCEPTION CLASS: java.lang.RuntimeException

    com.siebel.analytics.etl.etltask.GenericTaskImpl.doExecuteWithRetries(GenericTaskImpl.java:536)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:372)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:253)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.run(GenericTaskImpl.java:655)

    com.siebel.analytics.etl.taskmanager.XCallable.call(XCallable.java:63)

    java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)

    java.util.concurrent.FutureTask.run(FutureTask.java:138)

    java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:441)

    java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)

    java.util.concurrent.FutureTask.run(FutureTask.java:138)

    java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:886)

    java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:908)

    java.lang.Thread.run(Thread.java:619)

    : CAUSE:

    MESSAGE: change Capture failed.

    EXCEPTION CLASS: com.siebel.analytics.etl.execution.exceptions.ChangeCaptureTaskFailedException

    com.siebel.analytics.etl.etltask.ChangeCaptureTask.executeChangeCapture(ChangeCaptureTask.java:93)

    com.siebel.analytics.etl.etltask.ChangeCaptureTask.doExecute(ChangeCaptureTask.java:46)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.doExecuteWithRetries(GenericTaskImpl.java:477)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:372)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.execute(GenericTaskImpl.java:253)

    com.siebel.analytics.etl.etltask.GenericTaskImpl.run(GenericTaskImpl.java:655)

    com.siebel.analytics.etl.taskmanager.XCallable.call(XCallable.java:63)

    java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)

    java.util.concurrent.FutureTask.run(FutureTask.java:138)

    java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:441)

    java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)

    java.util.concurrent.FutureTask.run(FutureTask.java:138)

    java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:886)

    java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:908)

    java.lang.Thread.run(Thread.java:619)

    (Number of attempts: 1).

    IMG_BUILD - internal

    2013-12-27 21:22:31.526 CHANGE CAPTURE: IMG_BUILD - internal S_ASSET has finished running with the Failed state.

    [[code


    The CREATE VIEW privilege was missing from the CAD database user, therefore, was not to create the step. I have granted CREATE VIEW and all is well.

  • Failed to insert a new line with a column generated sequence id

    Hello

    I'm trying to insert a new row in a table containing a column of sequence according to db, used as the primary key.

    Here is the code for the custom method of the corresponding AM I use to insert the new line:

    Line row2 = getCaAppointments1 () .createRow ();
    row2.SetAttribute ("Member ID", Member ID);
    row2.SetAttribute ("Status", "Planned");
    row2.SetAttribute ("CreatedBy", coachId);
    row2.SetAttribute ("CreationDate", date);
    AppointmentId will be generated by the sequence
    DBSequence newId = row2.getAttribute("AppointmentId") (DBSequence);
    SequenceImpl s = new SequenceImpl ("XX_CA_APPOINTMENT_ID", getDBTransaction());
    Long next = newId.getSequenceNumber () .longValue ();
    System.out.println ("Got sequence as id:" + newId);
    row2.SetAttribute ("AppointmentId", newId);
    row2.SetAttribute ("CoachId", coachId);
    row2.SetAttribute ("Type", "0");
    row2.SetAttribute ("AppointmentNumber", 0);
    row2.SetAttribute ("PlannedDate", Department of justice);
    getCaAppointments1 (.insertRow (row2));

    I put the attribute EO 'AppointmentId' to use a DBSequence. I tried different combinations to get the sequence Id and insert a line. Nothing worked well and I'm unable to insert a new line.

    If I avoid using the attribute 'AppointmentId' and that you try to insert a row, it will fail with the error below:

    ORA-01400: cannot insert NULL into ('APPS'. "" "" XX_CA_APPOINTMENTS '. "" APPOINTMENT_ID") ORA-06512: at line 1

    Tried to insert the new row using BCTester but I am struck by the same error it (I was unable to change the value of the "AppointmentId" column when inserting the line because this column is read-only and it showed as - 2 value).

    I guess, since the attribute of column/is already marked to use a DBSequence, the value should be assigned by default and I shouldn't hit "cannot insert the value NULL to the column.
    Did I miss something necessary to trigger the sequence to automatically generate new Id and assign it to the new line before it is created?

    Please let me know the fix.

    Thanks in advance
    Rouhaud

    Hello

    Oracle changes this behavior each version, so I hope that its still OK.
    If you have a trigger on the table that inserts the value of the id if none is preset, then mark it as DBSequence, or be it the number.

    Now for your entity, just generate the impl class and override the method create, kind of old school, I know, but it never fails.
    In the create just add the code to your sequence you had:

    SequenceImpl seqImpl = new SequenceImpl("", thisTransaction);
    Number idValue= s.getSequenceNumber();
    setAttribute("Id", idValue);
    

    -Anton

  • raise errors ora-01426 truncating the table

    Hello

    We have a process that runs in the following process for some tabls game
    1 disable constraints
    2. the truncating tables
    3. activation of the constraints

    but after treatment for 5 tables, truncating up error

    BEGIN < process name >; END;



    *

    ERROR on line 1:

    ORA-01426: digital overflow

    ORA-06512: at the "< procedurename >", line 33

    ORA-06512: at line 1


    This line 33 point to run immeidate ' truncate table < table name >

    Can I know what is the reason for throwing "digital overflow" error truncating the table...

    Thanks in advance

    user9080289 wrote:
    Thank you.

    Is my verision of oracle 11g

    Then, you could have the described bug. Follow the instructions how to bypass (flush with low-value stats monitoring) or apply the #8226471 patch.

    Nicolas.

  • Insertion fails with not enough big column.

    I am confused I have a column on a table declared as NUMBER (21,16) However, when I tried to insert the number following (150000) in this column, I get an error.

    SQL Error: ORA-01438: value larger than specified precision allowed for this column
    01438. 00000 -  "value larger than specified precision allowed for this column"
    *Cause:    When inserting or updating records, a numeric value was entered
               that exceeded the precision defined for the column.
    *Action:   Enter a value that complies with the numeric column's precision,
               or use the MODIFY option with the ALTER TABLE command to expand
               the precision.
    

    What am I missing? It seems to me that the column is large enough to treat this number?.

    Any help would be greatly appreciated.

    Hello

    mlov83 wrote:

    I am confused I have a column on a table declared as NUMBER (21,16) However, when I tried to insert the number following (150000) in this column, I get an error.

    1. SQL error: ORA-01438: value larger than the precision specified for the column
    2. 01438 00000 - "value greater than the precision specified for the column.
    3. * Cause: When inserting or updating records, a numeric value has been entered
    4. which exceeded the precision defined for the column.
    5. * Action: Enter a value that is consistent with the precision of the numeric column,
    6. or use the option CHANGE with the ALTER TABLE command for expand
    7. the precision.

    What am I missing? It seems to me that the column is large enough to treat this number?.

    Any help would be greatly appreciated.

    (21: 16) NUMBER is NOT to say that you can have up to 21 digits before the comma.

    Average number (21: 16) you can have up to 21 digits in total, of which 16 will be after the comma.  There are only 5 digits before the comma.  150000 needs 6.

  • Addition of virtual column: ORA-12899: value too large for column

    I am using Oracle 11g, OS Win7, SQL Developer

    I'm trying to add the virtual column to my test table, but get ORA-12899: value too large for column error. Here are the details.
    Can someone help me in this?
    CREATE TABLE test_reg_exp
    (col1 VARCHAR2(100));
    
    INSERT INTO test_reg_exp (col1) VALUES ('ABCD_EFGH');
    INSERT INTO test_reg_exp (col1) VALUES ('ABCDE_ABC');
    INSERT INTO test_reg_exp (col1) VALUES ('WXYZ_ABCD');
    INSERT INTO test_reg_exp (col1) VALUES ('ABCDE_PQRS');
    INSERT INTO test_reg_exp (col1) VALUES ('ABCD_WXYZ');
    ALTER TABLE test_reg_exp
    ADD (col2 VARCHAR2(100) GENERATED ALWAYS AS (REGEXP_REPLACE (col1, '^ABCD[A-Z]*_')));
    
    SQL Error: ORA-12899: value too large for column "COL2" (actual: 100, maximum: 400)
    12899. 00000 -  "value too large for column %s (actual: %s, maximum: %s)"
    *Cause:    An attempt was made to insert or update a column with a value
               which is too wide for the width of the destination column.
               The name of the column is given, along with the actual width
               of the value, and the maximum allowed width of the column.
               Note that widths are reported in characters if character length
               semantics are in effect for the column, otherwise widths are
               reported in bytes.
    *Action:   Examine the SQL statement for correctness.  Check source
               and destination column data types.
               Either make the destination column wider, or use a subset
               of the source column (i.e. use substring).
    When I try to, I get the correct results:
    SELECT col1, (REGEXP_REPLACE (col1, '^ABCD[A-Z]*_'))
    FROM test_reg_exp;
    Thank you.

    Yes, RP, it works if you give col2 size > = 400.

    @Northwest - could you please test the same w/o having a clause of regex in col2?
    I have a doubt about using a REGULAR expression in this case Dynamics col.

    Refer to this (might help) - http://www.oracle-base.com/articles/11g/virtual-columns-11gr1.php
    Below excerpt from above link... see if that helps...
    >
    Notes and restrictions on the virtual columns include:

    The indexes defined on the virtual columns are equivalent to a function-based index.
    Virtual columns can be referenced in the updates and deletions WHERE clause, but they cannot be manipulated by DML.
    The tables containing virtual columns may still be eligible for result caching.
    Functions in expressions must be deterministic when the table is created, but can then be recompiled and non-deterministic without for as much invalidate the virtual column. In such cases, the following steps must be taken after the function is recompiled:
    Constraint on the virtual column must be disabled and re-enabled.
    On the virtual column indexes must be rebuilt.
    Materialized views that access the virtual column must be fully refreshed.
    The result cache must be flushed if the virtual column acceded to the request (s).
    Statistical table must be regathered.
    The virtual columns are not supported for the organized and external object in index, cluster or temporary tables.
    The expression used in the virtual column definition has the following restrictions:
    It cannot refer to another virtual column by name.
    It can refer to the columns defined in the same table.
    If it refers to a deterministic user-defined function, it cannot be used as a partitioning key column.
    The result of the expression must be a scalar value. It cannot return that an Oracle supplied the data type, a type defined by the user, LOB or LONG RAW.
    >

    Published by: Vanessa B on October 16, 2012 23:48

    Published by: Vanessa B on October 16, 2012 23:54

  • UPDATED MULTI-COLUMN ORA-00001

    When I try to update the 3 columns to s_cust with s_upd_fault data I get ORA-00001: unique constraint (DaveyB.FLT_REF) violated.

    I'm not sure why this is and how to fix it.

    I hope you can help.

    CREATE TABLE s_upd_fault AS
    SELECT  11111 AS s_fault_number,
                'David Bryan' AS s_full_name,
                'Closed' AS s_fault_status
                --'' AS t_adv_notes,
                --'' AS t_adv_fault_status
    FROM DUAL UNION ALL
    SELECT 11112, 'James Smith', 'Open' FROM DUAL UNION ALL
    SELECT 11113, 'Claire Smith', 'Closed' FROM DUAL UNION ALL
    SELECT 11114, 'Jenny Row', 'Closed' FROM DUAL UNION ALL
    SELECT 11115, 'Stan Lee', 'Closed' FROM DUAL UNION ALL
    SELECT 11116, 'John Steves', 'Closed' FROM DUAL UNION ALL
    SELECT 11117, 'James James', 'Open' FROM DUAL UNION ALL
    SELECT 11118, 'David David', 'Open' FROM DUAL UNION ALL
    SELECT 11119, 'Peter Peter', 'Open' FROM DUAL
    ;
    
    /* TEST DATA*/
    --INSERTS TODAYS DATA INTO THE TABLE
    INSERT INTO s_cust (s_fault_number, s_full_name, s_fault_status) ( 
    SELECT      s_fault_number, s_full_name, s_fault_status
    FROM        s_fault
    )
    ; 
    
    /*CREATES A TABLE TEMPLATE TO STORE THE DATA*/ 
    CREATE TABLE s_cust (
    s_fault_number  VARCHAR(20) CONSTRAINT flt_ref PRIMARY KEY,
    s_full_name     VARCHAR2(15),
    s_fault_status  VARCHAR2(10),
    t_adv_notes     VARCHAR2(20),
    t_adv_fault_status VARCHAR2(30),
        CHECK (s_fault_status IN ('Open', 'Closed'))  --VALIDATION
    );
    
    
    --UPDATE THE COLUMNS WITH NEW DATA
    UPDATE  
        s_cust 
    SET 
    (   s_fault_number,
        s_full_name,
        s_fault_status
    ) = 
    (   
        SELECT  s_fault_number,
                s_full_name,
                s_fault_status
        FROM    s_upd_fault
        WHERE   s_fault_number = '11111'
    )
    Edited by: DaveyB October 8, 2009 12:38

    Hello

    UPDATE
        s_cust
    SET
    (   s_fault_number,
        s_full_name,
        s_fault_status
    ) =
    (
        SELECT  s_fault_number,
                s_full_name,
                s_fault_status
        FROM    s_upd_fault
        WHERE   s_fault_number = '11111'
    )
    

    Because the above query is updated all the lines with s_fault_number as '11111', and since it is a primary key, you cannot update this value to more than one line.

    I guess you could want to do that

    UPDATE
        s_cust  s_cust
    SET
    (   s_fault_number,
        s_full_name,
        s_fault_status
    ) =
    (
        SELECT  s_fault_number,
                s_full_name,
                s_fault_status
        FROM    s_upd_fault suf
        WHERE   s_cust. s_fault_number = suf.s_fault_number
    )
    where s_fault_number = '11111'
    

    If you want to update the entire column and then withdraw where s_fault_number = '11111'

    Concerning
    Anurag Tibrewal.

  • Numbers (insert numbers or text in each column)

    Hello

    I tried very hard to insert a series of numbers or text from a file text and pdf, in my spreadsheet of numbers, but it retains paste all of the data in a single column or row.

    Example: I want to paste following: 123 3 45 2

    That I spend automatically in columnA columnB (123) columnC (45) and column d 2 (3)

    I tried to use TAB instead of SPACE between the numbers, and that does the trick... Only problem is I have a LOT of lines with numbers, so I would take me for always replace SPACE by TAB.

    Is there a way I can stick easily all of my numbers in separate columns?

    He's really hoping someone can help out me

    Best regards

    Michael

    copy the data

    paste into a new Text Edit document,

    Use the search and replace function to replace the spaces with a tab, select all, copy

    paste into an array of numbers

  • Insert in the table in separate columns

    I did the vi in the attachments. This basically vi, calculate a value from the device, this is the channel dashboard. I need more so: when calculating terminate, I need to insert data into a table, but the problem is: the number of lines in the constant table is the number of columns, I need the Temp Org chart. And these values are variable. I need a method to do this automatically. Or, I need a vi to 'build' these columns according to the number of rows in the table of constants.

    If the table of constants (number of lines) and the channel table (number of items) to match the size, where the other constants come when the size has to increase?

    What intrigues me is your use of construction "array index... build array. It's the same as truncate the initial 3-element array, regardless of the number of items is originally in there.

    Here's a quick rewrite that eliminates some of the questionable things. As I mentioned in the first sentence, I don't know really what you want.

  • inserting several rows of a particular column

    It comes to my table

    Select * from emp1.

    EMP_ID DEPT DEPTNO

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

    100 ICC

    112 tests

    Tesla 103

    104. IT

    S/N 105

    106 icc

    107. IT

    101 S/N

    tests of 111

    112 tests

    I want to update the deptno column only with a set of values totally 10 values.

    I did the below,

    SQL > start

    2 3 insert into emp1 (deptno) values (100);

    4 insert in emp1 (deptno) values (101);

    5 insert in emp1 (deptno) values (102);

    6 insert in emp1 (deptno) values (103);

    7 insert in emp1 (deptno) values (104);

    8 insert in emp1 (deptno) values (105);

    9 insert in emp1 (deptno) values (106);

    10 insert into emp1 (deptno) values (107);

    11 insert in emp1 (deptno) values (108);

    12 insert in emp1 (deptno) values (109);

    13 end;

    14.

    I messed up the table when trying to insert some values of this column and now my table looks as seen below after using a block anonymous plsql

    SQL > select * from emp1.

    EMP_ID DEPT DEPTNO

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

    100 ICC

    112 tests

    Tesla 103

    104. IT

    S/N 105

    106 icc

    107. IT

    101 S/N

    tests of 111

    112 tests

    EMP_ID DEPT DEPTNO

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

    100

    101

    EMP_ID DEPT DEPTNO

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

    102

    103

    104

    105

    106

    107

    108

    109

    PLSQL block used

    Start

    Insert in emp1 (deptno) values (100);

    insert into emp1 (deptno) values (101);

    insert into emp1 (deptno) values (102);

    insert into emp1 (deptno) values (103);

    insert into emp1 (deptno) values (104);

    insert into emp1 (deptno) values (105);

    insert into emp1 (deptno) values (106);

    insert into emp1 (deptno) values (107);

    insert into emp1 (deptno) values (108);

    insert into emp1 (deptno) values (109);

    end;

    /

    Please help me correct the table.

    You know what EMP_ID should be given what DEPTNO and corresponding use updated.

    SY.

  • call a function inside a function to insert into a table and receiver error - ORA-14551: cannot perform a DML operation within a query.

    Hi all

    your help is greatly appreciated...

    Calling B.fucntion inside an A.fonctions to insert data into a table.


    Here when you call the B.fucntion to insert data in the table... receiver AM a mistake

    Omitted in B - SQL Error: ORA-14551: cannot perform a DML operation inside a query...


    Can someone please help me to clarify this...


    The FUNCTION A(varUPD_TYPE IN VARCHAR2) RETURN VARCHAR2 IS
    varRETURN_VALUE VARCHAR2 (25): = NULL;

    numALLOWED_COUNT PROD. PROCESS_COUNTER. TYPE % ALLOWED_COUNT;
    numLAST_COUNT_ADDED PROD. PROCESS_COUNTER. TYPE % LAST_COUNT_ADDED;
    dtCHANGE_DATE DATE: = NULL;
    varSTMT VARCHAR2 (2000);
    bln_Allowed BOOLEAN;
    myVar VARCHAR2 (32767).


    BEGIN

    IF varUPD_TYPE = "A" THEN

    BEGIN
    SELECT CH_DATE, LAST_COUNT_ADDED, ALLOWED_COUNT
    IN dtCH_DATE, numLAST_COUNT_ADDED, numALLOWED_COUNT
    PROD. PROCESS_COUNTER
    WHERE NOM_PROCESSUS = "DAILY".
    AND COUNTER_IND = A '

    IF dtCH_DATE < = trunc (sysdate) THEN
    numLAST_COUNT_ADDED: = 0;
    END IF;

    EXCEPTION
    WHILE OTHERS THEN
    numLAST_COUNT_ADDED: = 0;
    numALLOWED_COUNT: = 1;
    END;
    IF numALLOWED_COUNT > = numLAST_COUNT_ADDED + 1 THEN

    bln_Allowed: = True;

    varSTMT: = "UPDATE PROD. TMS_PROCESS_COUNTER ';
    varSTMT: = varSTMT | ' SET last_count_added = ' | (numLAST_COUNT_ADDED + 1);
    varSTMT: = varSTMT | "WHERE nom_processus =" DAILY "';
    varSTMT: = varSTMT | "AND COUNTER_IND ="D"';


    IF varSTMT IS NOT NULL
    THEN
    MyVar: = B(96,varSTMT);
    PROC_LOG (' CALL B ': myVar);
    IF myvar > 0 THEN
    NULL;
    END IF;
    END IF;
    On the other

    End if;

    END IF;

    EXCEPTION WHEN OTHERS THEN
    PROC_LOG ("A failed '");
    PROC_LOG (' SQL error: ' |) SUBSTR (SQLERRM, 1, 1000));
    RETURNS A NULL VALUE.
    PUT AN END TO;

    The FUNCTION B(numTABLE_ID IN NUMBER, varSQL_STATEMENT IN VARCHAR2) RETURNS NUMBER IS
    varINSERT_BATCH_STMT VARCHAR2 (32767): = NULL;
    varADD_REC_TYPE BATCH_TABLES. TYPE % ADD_REC_TYPE;

    BEGIN

    INSERT INTO BATCH_STATEMENT (ID, TABLE_ID, STATEMENT, QUEUE_SEQUENCE_ID)
    VALUES (Numidian, numTABLE_ID, varSQL_STATEMENT, 1);

    EXCEPTION WHEN OTHERS THEN
    PROC_LOG ('B failed');
    PROC_LOG (' SQL error: ' |) SUBSTR (SQLERRM, 1, 1000));
    RETURNS - 1;
    END B;


    Structure of the Batch_statement table:


    ID Number (15) not null
    number (2) not null table_id
    Statement varchar2 (4000) not null
    Queue_sequence_id number (5) not null


    Why do you do such coding mess full of bad practices.

    Remove the exceptions WHEN OTHERS, you're a turing a mistake in this way, they are bugs and (never) use functions to perform DML.

    Functions are not intended for DML. Period.

  • Presentation of master-detail Spry insert cannot get more than two columns?

    Ive been trying to get more than two columns only experiment with spry data sets and can not with the option to «insert master/detail layout» layout

    What I am doing wrong?

    ??????

    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    "< html xmlns ="http://www.w3.org/1999/xhtml"" xmlns: spry = "http://ns.adobe.com/spry" > ""
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
    < title > Untitled Document < /title >

    < script src = "SpryAssets/SpryData.js" type = "text/javascript" > < / script > "
    < script src = "SpryAssets/SpryHTMLDataSet.js" type = "text/javascript" > < / script > "
    < link href = "SpryAssets/SpryMasterDetail.css" rel = "stylesheet" type = "text/css" / > "
    < script type = "text/javascript" >
    DS1 var = new Spry.Data.HTMLDataSet ("benefitsdata.html", "bizben", {firstRowAsHeaders: false});
    < /script >
    < / head >

    < body >
    < div align = "center" >
    < div class = "MasterDetail" >
    < div spry: region = "ds1" class = "MasterContainer" >
    < div class = "MasterColumn" spry: repeat = "ds1" spry: setrow = "ds1" spry: hover = "MasterColumnHover" spry: select = "MasterColumnSelected" > {column0} < / div >
    < / div >
    < div spry: detailregion = "ds1" class = "DetailContainer" >
    < div class = "DetailColumn" > {column1} < / div >
    < div class = "DetailColumn" > {Column2} < / div >
    < div class = "DetailColumn" > {Column3} < / div >
    < / div >
    < br style = "" clear: both "/ >"
    < / div >
    < / div >
    < / body >
    < / html >

    ____________

    Spry framework all related examples are available here: http://adobe.github.com/Spry/samples/ you can take a look.

    On a sidenote, Spry has been deprecated and is no longer officially supported by Adobe: http://blogs.adobe.com/dreamweaver/2012/08/update-on-adobe-spry-framework-availability.htm l

    I would recommend that you switch to a jQuery library to your other needs.

  • Insert the loop by a report or insertion using a link of the column

    Hello!

    I think I have an easy one.

    I created a site that lists 'problems' with the curriculum of the University. If a curriculum developer sees something that needs to be updated, they use this site to connect to the 'question' so we have a drop-down list of how the program has changed for the particular course or courses. Some 'problems' cover several courses, if a table has been created to allow the issue to join courses as needed.

    The 'Courses' table contains a list of all courses at University
    The 'Issue_Courses' table combines the primary key of the 'question' and the 'course' and creates the association between the questions and the courts.

    The users use of page to create the associations has a report called 'add_courses' which can be consulted and filterable so that the user can refine the list of courses they want to see (the list is well into the thousands), and this report contains a column with checkboxes. This page also contains a hidden field containing the primary key of the issue, "p13_Issue_ID."

    I would like to create an insert query that takes hold of the primary key of the issue of "p13_issue_ID", she travels around the report, by inserting a new record for each box checked in the report. Any help would be great! Certainly, my sql is pretty week.

    Another option that I think would work, if possible, to have a "link in the column" that simply runs the insertion process by entering the primary key for the problem of "p13_issue_ID" and the id of the course of the report. Then, the user could just click on a link 'Add' or something similar on the report, which would go to the insert statement and essentially create this association. Is this possible?

    Thanks in advance!

    Published by: 846852 on March 23, 2011 15:12

    Published by: 846852 on March 23, 2011 15:14

    that should have been this line

    1 IN 1.APEX_APPLICATION. G_f01. COUNTY

    I typed 1 instead of I

    To take

    BECAUSE me IN 1.APEX_APPLICATION. G_f01. COUNTY

  • How to insert unique random values in 2 columns?

    I have a table with 2 columns

    Create table code_for_code)
    first_code varchar2 (10) unique not null,.
    second_code varchar2 (10) not null unique);

    and I want to make PL/SQL code to Insert unique values at random in two columns , for example 20 record... How can I do something like that?
    DECLARE
       i   NUMBER := 0;
    BEGIN
       LOOP
          INSERT INTO code_for_code
             SELECT first_code, second_code
               FROM (SELECT DBMS_RANDOM.STRING ('U', 20) first_code,
                            DBMS_RANDOM.STRING ('U', 20) second_code
                       FROM DUAL) a
              WHERE NOT EXISTS (
                       SELECT 1
                         FROM code_for_code
                        WHERE first_code = a.first_code
                          AND second_code = a.second_code);
    
          i := i + 1;
          EXIT WHEN i >= 20;
       END LOOP;
    
       COMMIT;
    END;
    
  • How to insert Mutiple data in a single column

    I have an E_CTIC_DTA table with a clob column

    I want to insert all the data from EMP in this clob column that too in a single line
    When each series of records must be in a new line.

    for example: 121 AH 5000 50 131 MACIEL 1000 10 141 KING 5000 50

    The text file should look like below when we choose the CLOB

    121 50 5000 SALOME
    131 1000 10 MACIEL
    141 KING 5000 50

    Any reference links or suggestions please...

    Thanks in advance...

    Hello

    A simple example:

    DECLARE
        v_clob CLOB;
        v_line VARCHAR2(4000);
    BEGIN
        FOR reg IN (SELECT *
                    FROM   employees e)
        LOOP
            -- Loading new line (maybe using a procedure, etc).
            v_line := reg.employee_id || reg.first_name;
    
            -- Adding the line to the clob
            v_clob := v_clob || v_line || CHR(13);
        END LOOP;
    
        -- Inserting into the table
        INSERT INTO E_CTIC_DTA
        VALUES v_clob;
    
        COMMIT;
    END;
    /
    

    Kind regards

Maybe you are looking for