ORA-00936: missing expression when adding virtual column

I am having this error when you add virtual column am in database 11 g

having error

ORA-00936: lack of expression

in select superior

My sql is

Employees ALTER TABLE ADD (user name (select upper (substr (first_name, 1, 1)) | initcap (last_name) user name of employees));

http://docs.Oracle.com/CD/E11882_01/server.112/e41084/statements_3001.htm#sthref3374

Adding a column of Table virtual: example, the following statement adds a copy of the hr.employees table a column named income , which is a combination of salary more commission. Wages and the commission are NUMBER columns, so the database creates the virtual column as a NUMBER same column if the data type is not specified in the statement:

CREATE TABLE emp2 AS SELECT * FROM employees; ALTER TABLE emp2 ADD (income AS (salary + (salary*commission_pct)));

ALTER TABLE ADD employees (AS username (upper (substr (first_name, 1, 1)) | initcap (last_name)));

Concerning

Etbin

Tags: Database

Similar Questions

  • ORA-20001 & ORA-00936 "Next day" filter on any column of Date IR

    When you select the filter 'Next day' on any date in any interactive report column, you get:
    ORA-20001: get_dbms_sql_cursor error ORA-00936: lack of expression

    This applies to the IRs application and also any request of manufacturer IRs.

    I find it also strange that there is no filter 'Today' in the list.

    Sorry, I forgot the version banner:

    Request Express 4.0.1.00.03
    Apex listener 1.10.230.17.38
    Containers for J2EE 10 g (10.1.3.5.0) Oracle (build 090727.2000.36696)
    Oracle Database 11 g Release 11.2.0.1.0 - 64 bit Production

    g.

    Published by: gabs on Aug 30, 2010 04:48

    Gabs,

    Please let us know. A bug is saved for this problem. We will try to fix it in the next version.

    Kind regards
    Christina

  • Query took too much time when adding new column to the table and the index set on this

    I added a new column to the table that contains thousands of records. and created the composite index with three columns (those newly added + two existing column)

    for the specifics. TBL table there are two columns col1, col2

    I added the new column col3 to TBL and created composit index (col1, col2, col3).

    Now for all the records in col3 is NULL. When I choose on this table, it takes too long...

    Any idea what my I do bad., I have check the query plan, it is using the index

    It is solved using collection of statistics using the

    DBMS_STATS. GATHER_TABLE_STATS

    @Top.Gun thanks for your review...

  • ORA-01722: invalid number - when the last column has numbers that have a decimal separator

    Here are examples of data-

    FRT, 1.64, VAT, 23,36

    FRT, 1.64, VAT, 23,36

    When I try to convert 1.64 to_number everything is good, but when I do the same thing with 23,36 I get the following error

    ORA-29913: error in executing ODCIEXTTABLEFETCH legend

    ORA-01722: invalid number

    ORA-06512: at "SYS." ORACLE_LOADER', line 52

    I tried this query example

    Select to_number (CONSIGNMENT_NET_VALUE) as Col1 of DUMP_EXT

    Select to_number (CONSIGNMENT_NET_VALUE, '9999999999D' 99999', NLS_NUMERIC_CHARACTERS = ",". ") as Col1 DUMP_EXT-> 268906.1

    make the same mistake - any help greatly appreciated.

    T.

    Srini

    Try using:

    RECORDS DELIMITED BY newline

    Instead of:

    RECORDS DELIMITED BY '\n'


    on your table to create, in addition to just help to_number or to_number return with ' NLS_NUMERIC_CHARACTERS = ".," ' in your query, in the period before the comma as decimal separator comes before the grouping separator.

    What is probably happening is that your return to the line of the system data come from different East of your new line on the system that you load in.  You may need to experiment and

    Select dump (consignment_net_value) in the dump_ext;

    to determine what additional invisible characters, such as Chr (10) and Chr (13) can be added at the end of the number that you have to cut, so just using line feed does not work.  This is why it only happens with the numbers at the end of the line.

    Post edited by: BarbaraBoehmer

  • strange error when adding a column

    I try to execute the following SQL, but this error:

    ALTER TABLE s1_grainsmart_option
    ADD ppv_flag char (1) default ' is not null
    CONSTRAINT ckc_gso_ppv_flag CHECK (ppv_flag IN ('Y', ' don't))


    ERROR: a problem occurred while running script 1700050069
    ORA-02293: cannot validate (GRAINV17UNICODE. CKC_GSO_PPV_FLAG) - violated check constraint

    Here is the definition of the table:

    CREATE TABLE s1_grainsmart_option

    (

    go_key number not null,

    ps_same_number_flag char (1) default ' is not null

    CONSTRAINT ckc_gso_ps_same_num_flag CHECK (ps_same_number_flag IN ('Y', ' don't)).

    wheat_board_req_flag char (1) default ' is not null

    CONSTRAINT ckc_gso_wb_req_flag CHECK (wheat_board_req_flag IN ('Y', ' don't)).

    multiple_currencies_flag char (1) default ' is not null

    CONSTRAINT ckc_gso_multi_currencies_flag CHECK (multiple_currencies_flag IN ('Y', ' don't)).

    ar_software_interface varchar2 (30) null,

    ap_software_interface varchar2 (30) null,

    gl_software_interface varchar2 (30) null,

    inv_software_interface varchar2 (30) null,

    gl_by_location_flag char (1) default 'Y' not null

    CONSTRAINT ckc_gso_gl_by_location_flag CHECK (gl_by_location_flag IN ('Y', ' don't)).

    CONSTRAINT pk_grainsmart_option PRIMARY KEY (go_key)

    using index

    tablespace smartsoft_index

    )

    tablespace smartsoft_data

    BTW, there are several (approx. 200 'flag' columns) I didn't want to weigh the definition of "create table".

    I do not understand the error; I use this syntax to add a required column with a default value of hundreds (if not more) times, but in this case, it issues an error.

    Oracle Standard Edition 64-bit on Windows 2008 R2 Server 11.2.0.4.

    Thank you

    Murray

    I have several variations of this type of script; sometimes randomly (it seems) a script of this type will fail without obvious reason.

    What 'type' of the script are you talking about? You have not viewed the CONTENTS of the script.

    No one can say what could be done unless you post your script.

    Guess that it is a problem of Support of Oracle.

    Support will NOT be able to help you either unless you provide the necessary information.

    Create the SMALLEST possible script and example that re-creates the problem. Others have said the fundamental reason for an exception of this family: you have data that VIOLATE the constraint.

    Only YOU know that that data that you use because you have not posted any data for us to watch either.

    Remove data that violate the constraint.

  • Problem when adding new column on table with report form

    Hello

    I have a form on table (either emp) with report(select_empno,ename,job_from_emp).i have insert, update, delete operations on the table.

    Now I added a new column DOB for alteration report emp.i sql query to show the new column altered report.i insert process (Block anonymous plsql) to insert this column too all by creating a new row.but the problem is with update.i am not able to find how to upgrade this new column while doing the update to line level.

    pls let me know if you can give some ideas on this.


    Kind regards
    CK

    Well, sorry for sounding terse.

    I have a few questions.

    Have you added the item to the form page and associated with the database column?
    You use your own PL/SQL page process to update or do you use the 'row emp process' process produced auto?
    If it's your own please send the code with the word {noformat}

    {noformat} (with the curly brackets and in lower case) above and below it. Your code should be formatted like this once you've hit post message:
    

    BEGIN

    NULL;

    END;

    Cheers
    
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    
  • Adding a foreign key when adding a column

    Hi all

    How to add a column with constriant foreign key

    I have a table TEST (pk number nm)
    and TEST1 (PK nm1)

    TEST1, I need to add a column nm2 which referred to TEST (nm), using the unique ALTER command


    Please help in this.

    Hello

    Please check the documentation for it, it's all there:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/clauses002.htm#CJAGIICD

    ALTER TABLE test1 ADD (
     nm2 NUMBER
     CONSTRAINT nm2_fk REFERENCES test(nm)
    );
    
  • ORA-00936: lack of Expression when using separate

    Hello

    I am writing a piece of code that works fine until I put the function separate on the third line, and then I get oracle error: ORA-00936: missing Expression.

    Someone understands where I'm wrong?
          select
                customer_id,
                *distinct* substr(old_system_id, instr(old_system_id, ':') +1, 4),
                substr(old_system_id, 1, instr(old_system_id,':')-1),
                old_system_id
          from
                ph1_ca_load
          inner join
                ph1_site_map_load
          on
                substr(old_system_id, 1, instr(old_system_id,':')-1) = site_code
          inner join
                customer
          on
                name = billing_customer
    ;
     Select     Distinct
                customer_id,
                 substr(old_system_id, instr(old_system_id, ':') +1, 4),
                substr(old_system_id, 1, instr(old_system_id,':')-1),
                old_system_id
          from
                ph1_ca_load
          inner join
                ph1_site_map_load
          on
                substr(old_system_id, 1, instr(old_system_id,':')-1) = site_code
          inner join
                customer
          on
                name = billing_customer
    ;
    
  • Need help with ORA-00936: lack of expression

    11.2.0.3
    desc killsessionlog
     Name                                                  Null?    Type
     ----------------------------------------------------- -------- --------------
     KILLTIME                                              NOT NULL DATE
     USERNAME                                              NOT NULL VARCHAR2(30)
     SID                                                   NOT NULL NUMBER
     SERIAL#                                               NOT NULL NUMBER
     CTIME                                                 NOT NULL NUMBER
     MACHINE                                                        VARCHAR2(64)
     TERMINAL                                                       VARCHAR2(30)
     PROGRAM                                                        VARCHAR2(48)
     ACTION                                                         VARCHAR2(64)
     MODULE                                                         VARCHAR2(64)
    to test the code to kill the blocker
    SQL> create or replace procedure killblocker
      2  is
      3  stmt varchar2(1000);
      4  cursor c1 is 
      5  select  s1.SQL_EXEC_START+l1.ctime killtime, s1.username,s1.sid,s1.serial#,l1.ctime ,s1.machine
    ,s1.TERMINAL, s1.PROGRAM,s1.ACTION,s1.MODULE
      6      from v$lock l1, v$session s1, v$lock l2, v$session s2
      7      where s1.sid=l1.sid and s2.sid=l2.sid
      8      and l1.BLOCK=1 and l2.request > 0
      9      and l1.id1 = l2.id1
     10      and l2.id2 = l2.id2 
     11      and l1.ctime >0;
     12  begin
     13  for i in c1 loop 
     14  EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION ''' || i.sid || ',' || i.serial# || '''';
     15  stmt := 'insert into killsessionlog values ('||i.killtime||','|| i.username||','||i.sid||','||i
    .serial#||','||i.ctime||','||i.machine||','||i.TERMINAL||','|| i.PROGRAM||','||i.ACTION||','||i.MODU
    LE||')'
     16  ;
     17  EXECUTE IMMEDIATE stmt;
     18  dbms_output.put_line('SID '||i.sid ||' with serial# '||i.serial#||' was killed');
     19    END LOOP; 
     20  END; 
     21  /
    
    Procedure created.
    created the blocker and blocked the sessions.
    SQL> exec killblocker
    BEGIN killblocker; END;
    
    *
    ERROR at line 1:
    ORA-00936: missing expression
    ORA-06512: at "NN.KILLBLOCKER", line 17
    ORA-06512: at line 1
    worked the first EXECUTE IMMEDIATE for the murder of the session, but the 2nd EXECUTE IMMEDIATE for insertion failed as above. Not able to understand the problem.

    TIA
    SQL> create or replace procedure killblocker
      2  is
      3  stmt varchar2(1000);
      4  cursor c1 is
      5  select  s1.SQL_EXEC_START+l1.ctime killtime, s1.username,s1.sid,s1.serial#,l1.ctime ,s1.machine
    ,s1.TERMINAL, s1.PROGRAM,s1.ACTION,s1.MODULE
      6      from v$lock l1, v$session s1, v$lock l2, v$session s2
      7      where s1.sid=l1.sid and s2.sid=l2.sid
      8      and l1.BLOCK=1 and l2.request > 0
      9      and l1.id1 = l2.id1
     10      and l2.id2 = l2.id2
     11      and l1.ctime >0;
     12  begin
     13  for i in c1 loop
     14  EXECUTE IMMEDIATE 'ALTER SYSTEM KILL SESSION ''' || i.sid || ',' || i.serial# || '''';
     15  stmt := 'insert into killsessionlog values (:killtime, :username, :sid, :serial#, :ctime, :machine, :TERMINAL, :PROGRAM, :ACTION, :MODULE)'
     16  ;
     17  EXECUTE IMMEDIATE stmt using i.killtime, i.username, i.sid, i.serial#, i.ctime, i.machine, i.TERMINAL, i.PROGRAM, i.ACTION, i.MODULE;
     18  dbms_output.put_line('SID '||i.sid ||' with serial# '||i.serial#||' was killed');
     19    END LOOP;
     20  END;
     21  / 
    

    Gerard

  • SQL Loader Missing expression error.

    Hi guru

    I'm updating data from csv to database table. Here I am attaching my control file and log file... you can help resolve the following error message.

    Control file:
    LOAD DATA 
    INFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.csv' 
    BADFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.bad'
    DISCARDFILE 'C:\Users\bura.sami\Documents\MSBLive Oracle Objects.dsc'
    
    INTO TABLE MSBLIVE_OBJECTS
    INSERT
    FIELDS TERMINATED BY ","
    optionally enclosed by '"'
    trailing nullcols
      (
      INDEX_NAME CHAR "trim(Index)",
      TABLE_NAME CHAR "trim(Table)",
      VIEW_NAME  CHAR "trim(View)",
      TRIGGER_NAME  CHAR "trim(Trigger)",
      SEQUENCE_NAME  CHAR "trim(Sequence)",
      PROCEDURE_NAME  CHAR "trim(Procedure)",
    PACKAGE_NAME  CHAR "trim(Package)",
    PACKAGE_OBJECT  CHAR "trim(Package Body)", 
       FUNCTION_NAME  CHAR "trim(Function)"
    )
    
    {code}
    
    *Error log:*
    
    {code}
    
    SQL*Loader: Release 10.2.0.1.0 - Production on Wed Nov 24 14:31:05 2010
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Control File:   simple_load.ctl
    Data File:      C:\Users\bura.sami\Documents\MSBLive Oracle Objects.csv
      Bad File:     C:\Users\bura.sami\Documents\MSBLive Oracle Objects.bad
      Discard File: C:\Users\bura.sami\Documents\MSBLive Oracle Objects.dsc 
     (Allow all discards)
    
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    
    Table MSBLIVE_OBJECTS, loaded from every logical record.
    Insert option in effect for this table: INSERT
    TRAILING NULLCOLS option in effect
    
       Column Name                  Position   Len  Term Encl Datatype
    ------------------------------ ---------- ----- ---- ---- ---------------------
    INDEX_NAME                          FIRST     *   ,  O(") CHARACTER            
        SQL string for column : "trim(Index)"
    TABLE_NAME                           NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "trim(Table)"
    VIEW_NAME                            NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "trim(View)"
    TRIGGER_NAME                         NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "trim(Trigger)"
    SEQUENCE_NAME                        NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "trim(Sequence)"
    PROCEDURE_NAME                       NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "trim(Procedure)"
    PACKAGE_NAME                         NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "trim(Package)"
    PACKAGE_OBJECT                       NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "trim(Package Body)"
    FUNCTION_NAME                        NEXT     *   ,  O(") CHARACTER            
        SQL string for column : "trim(Function)"
    
    Record 1: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 2: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 3: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 4: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 5: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 6: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 7: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 8: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 9: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 10: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 11: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 12: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 13: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 14: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 15: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 16: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 17: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 18: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 19: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 20: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 21: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 22: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 23: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 24: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 25: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 26: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 27: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 28: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 29: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 30: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 31: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 32: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 33: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 34: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 35: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 36: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 37: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 38: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 39: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 40: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 41: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 42: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 43: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 44: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 45: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 46: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 47: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 48: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 49: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 50: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    Record 51: Rejected - Error on table MSBLIVE_OBJECTS, column INDEX_NAME.
    ORA-00936: missing expression
    
    
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    
    Table MSBLIVE_OBJECTS:
      0 Rows successfully loaded.
      51 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    
    
    Space allocated for bind array:                 148608 bytes(64 rows)
    Read   buffer bytes: 1048576
    
    Total logical records skipped:          0
    Total logical records read:            64
    Total logical records rejected:        51
    Total logical records discarded:        0
    
    Run began on Wed Nov 24 14:31:05 2010
    Run ended on Wed Nov 24 14:31:34 2010
    
    Elapsed time was:     00:00:29.71
    CPU time was:         00:00:00.03
    Thanks and greetings
    Saami

    Hello

    You can set your syntax for all areas (example here for only one field):

    INDEX_NAME CHAR "trim(:INDEX_NAME)",
    

    You can only refer to the names used as domain names.

    Herald tiomela
    http://htendam.WordPress.com

  • Virtual column NOT NULL

    Hello dear colleagues,

    Anyone able to replicate this?
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Create a small table:
    SQL> create table t(x number not null);
    
    Table created.
    Now, add a virtual column, using decode:
    SQL> alter table t add (y varchar2(1) as (decode(x, 1, 'A', 'B')) not null);
    
    Table altered.
    'The same', using case column
    SQL> alter table t add (z varchar2(1) as (case x when 1 then 'A' else 'B' end));
    
    Table altered.
    Only it wasn't the same, I wanted to NOT NULL.
    If I do, I get:
    SQL> alter table t add (w varchar2(1) as (case x when 2 then 'A' else 'B' end) not null);
    alter table t add (w varchar2(1) as (case x when 2 then 'A' else 'B' end) not null)
                                                                     *
    ERROR at line 1:
    ORA-03113: EOF pÕ kommunikationskanal
    Process ID: 3400
    Session ID: 140 Serial number: 213
    This is consistent with this database on my laptop.


    Concerning
    Peter

    Looks like you have perhaps hit Bug Bug 9277263: ORA-07445 [ATBNUL () + 299] WHEN ADDING a CONSTRAINT INLINE ON a VIRTUAL COLUMN

  • ORA-01733-virtual column not allowed here - insert using inline view

    Does anyone know why I get ORA-01733-virtual column not allowed here

    SQL > select * from v version $;

    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    AMT for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production



    -no error without the WITH CHECK option

    SQL > INSERT INTO
    2 (SELECT
    3 location_id,
    4 city
    5 l.country_id
    6 OF country c, localities, regions r l
    7 where l.country_id = c.country_id
    8 and c.region_id = r.region_id
    9 and r.region_name = 'Asia')
    10 VALUES (5500, 'Common Wansdworth', 'UK');

    1 line of creation.

    SQL > rollback;

    Complete restoration.


    -error with WITH CHECK OPTION


    SQL > INSERT INTO
    2 (SELECT
    3 location_id,
    4 city
    5 l.country_id
    6 OF country c, localities, regions r l
    7 where l.country_id = c.country_id
    8 and c.region_id = r.region_id
    9 and r.region_name = 'Asia' WITH CHECK OPTION)
    10 VALUES (5500, 'Common Wansdworth', 'UK');
    INSERT INTO
    *
    ERROR on line 1:
    ORA-01733: virtual column not allowed here




    I was expecting

    ORA-01402: discovers the violation of where WITH CHECK OPTION clause

    for the second. Am I missing here?

    Coskan wrote:
    Randolf

    Thanks a lot for the update of this old question
    After reading the link, I think I should ignore this error and accept him as ORA-01402

    The information that you have asked me to check me do not have an understanding of the different error types.

    Coskan,

    I didn't know this is an old thread that somehow got updated by someone else.

    Regarding your question: you're right that the output of the script is not really that useful.

    I have just run on 10.2.0.4 and in general, it seems that the output of USER_UPDATABLE_COLUMNS is incorrect regarding the views of join using the WITH CHECK OPTION.

    For example although the location_id from the TEST_V_2 column appears as non-editable (probably because of the rule that "the columns used in the join expression" cannot be modified in a join view when you use the WITH CHECK OPTION) I can run successfully your insert if statement I choose a location_id less than 2000.

    It seems that summed up the difference if you join more than two tables, you'll always get the error "ORA-01733" when you try to insert in the join with the enabled OPTION CHECK view. For example to add a third table TEST_V_2 which does not change the original view, but simply joined meaning for example COUNTRIES to LOCATIONS, will show the same behavior to throw an ORA-01733, however it works fine when the omission of the WITH CHECK OPTION.

    So overall, I tend to say it is really a limitation of the implementation and it is not actually an ORA-01402 but looks like Oracle is simply trying to tell you: Amendment No. INSERT in this possible view. Updates however seem to work, at least I can find some examples of work.

    There seems to be other restrictions of implementation with the WITH CHECK OPTION in place even when the only membership as two tables, for example when trying to join the COUNTRIES and PLACES but by selecting only in PLACES and by using a filter on the COUNTRY_ID predicate fails with ORA-01733 when this predicate is applied to the COUNTRY. COUNTRY_ID but it works if this predicate is applied to PLACES. COUNTRY_ID.

    I could imagine that Oracle has quietly added some of these restrictions with each patch set due to the angle of the case/adverse reactions encountered. I saw this for other features, too.

    Kind regards
    Randolf

    Oracle related blog stuff:
    http://Oracle-Randolf.blogspot.com/

    SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676 /.
    http://sourceforge.NET/projects/SQLT-pp/

  • ERROR: ORACLE prepare error: ORA-00936: lack of expression

    Hello

    I am required to run the 'pass-through' Oracle SQL, to extract data from tables in the SAS for processing and handling. My code (attached) reads and writes (runs) but with zero records to test first. I can't get beyond the error to prepare.

    The request is just like other queries that seem to work, but I can't get past this prepare error. I have no other access to individauls with an adequate knowledge of the PL SQL and as a last stop hoped others in the forum could quickly identify the source of the error.

    Thank you very much in advance for any help.

    Jeff
    _______________________________________

    1; *'; * « ; * / ; Quit; execution risk;
    2 OPTIONS NUMPAGE = MIN;
    3% LET _CLIENTTASKLABEL = % NRBQUOTE (rx_biplr_v3_2);
    4% LET _EGTASKLABEL = % NRBQUOTE (rx_biplr_v3_2);
    5% LET _CLIENTPROJECTNAME = %NRBQUOTE();
    6% LET _SASPROGRAMFILE =;
    7
    8 ODS CLOSE SUBJECT;
    NOTE: Some of your options or statements will not be managed with the Activex or Java Series devices. Chart by default for these
    drivers may be different from other SAS/GRAPH device drivers. For more information, please contact Technical Support.
    9 OPTIONS DEV = ACTIVEX;
    10 EGHTML TEMP FILE NAME;
    NOTE: Writing, body HTML (EGHTML) file: EGHTML
    11 ODS HTML(ID=EGHTML) FILE = EGHTML ENCODING = 'utf - 8' STYLE = EGDefault.
    11. STYLESHEET=(URL="file:///C:/program%20Files/SAS/shared%20Files/BIClientStyles/EGDefault.CSS")
    11. ATTRIBUTES = ("http://www2.sas.com/codebase/graph/v91/sasgraph.exe"="CODE") NOGTITLE NOGFOOTNOTE GPATH = & sasworklocation
    11.
    12
    gaccessible 13%;
    14 /********************************************************/
    15 * RX_BIPLR_V3. SAS;
    16 /********************************************************/
    17
    18 dm 'journal clearly out; delete ";
    19 linesize options = 120;
    20 option obs = 0 NoReplace;
    21
    22 ****************************************************************************************;
    23 * date reviewed programmer in WHICH WAS MADE;
    24 *----- -------------- ------------ -----------------------------------------;
    25 * 2005 creation of David Boyd program to the test population;
    26 *;
    27 * 06/02/2006 Ivon Jones changed to include the whole of the population;
    28 *;
    29 * 20/07/2006 Ivon Jones identified the holdout data elements;
    30 * or inclusion in the consolidation with;
    31 * Robin report;
    32 *;
    33 * 18/08/2006 Ivon Jones updated specific therapeutic Classes.
    34 * 10 - 2009 J Shaf - changed to extract actual or potential of UBH bipolar Dx and medical claims.
    35 ****************************************************************************************;
    36
    37
    38
    39 * % let allclmorgn = (', 'A'); / * claims origin code * /.
    40% would let begdate ='01 SEP 2009;
    41% let enddate = 30 SEP 2009 would be;
    42% let q = %str(%');
    43
    44
    45 data _null_;
    46. call symput ("fdos", put (intnx ('month' ' and begdate "d,-27," starts"), date9.));
    47 call symput ('ldos', put (intnx ('months', ' and enddate "d-0, 'end'" "), date9.));
    48, run;

    NOTE: DATA statement used (total duration of processes):
    time real 0.01 seconds
    2 the system SAS 11:44 Friday, October 30, 2009

    time CPU 0.01 seconds


    49
    50
    51
    52 **************************************************************;
    53 *? Data _null_ stage allows to create a macro variable to;
    54 * year and month, based on the macro ldos variable in the data;
    55 * step up? ;
    56 **************************************************************;
    57
    58
    59 data _null_;
    If 60 months ("& ldos" d) < 10
    61, then call symput ("yr_mo", compress (year ("& ldos" d) |)) '0' || months ("& ldos" d)));
    62 other call symput ("yr_mo", compress (year ("& ldos" d) | months ("& ldos" d)));
    63 to run;

    NOTE: The numeric values were converted to character values in the locations given by: (Line): (Column).
    61:39 61:64 62:39 62:57
    NOTE: DATA statement used (total duration of processes):
    time real 0.01 seconds
    time processor 0.01 seconds


    64
    65 * make % & biplr_dx;
    position 66% & begdate;
    ' 01 SEP 2009 would be
    67% put & enddate;
    30 SEP 2009 would be
    68% put & fdos;
    JUNE 1, 2007
    69% put & ldos;
    SEPTEMBER 30, 2009
    70% put & q;
    '
    71
    72
    73 libname biplr ' / home/jshafi01/projects/adhoc/biplr_dprsn/data ';
    NOTE: Libref BIPLR has been awarded with success as follows:
    Engine: V9
    Physical name: / home/jshafi01/projects/adhoc/biplr_dprsn/data
    74 rosdwp libname = oracle user "& oracle_user." pass = "& oracle_pass." ' buffsize = 32767 path = "rosdwp"; "
    NOTE: Libref ROSDWP has been awarded with success as follows:
    Engine: ORACLE
    Physical name: rosdwp
    75
    work.biplr_up_v1 76 data;
    mbr_id length 77 attrib = $ 26;
    78 the value biplr.biplr_ubh_med_v1;
    79 to be performed;

    NOTE: There were 0 read comments from the BIPLR data set. BIPLR_UBH_MED_V1.
    NOTE: All data WORK. BIPLR_UP_V1 has 0 comments and variables 1.
    NOTE: DATA statement used (total duration of processes):
    time real 0.01 seconds
    3 the system SAS 11:44 Friday, October 30, 2009

    time processor 0.01 seconds


    80
    81 proc content;
    82 to be performed;

    NOTE: PROCEDURE used CONTENT (total duration of processes):
    time real 0.03 seconds
    time CPU 0.03 seconds


    83
    84 proc datasets
    85 = rosdwp nolist library.
    86. delete biplr_up_v1;
    87 of quitting;

    NOTE: The removal of ROSDWP. BIPLR_UP_V1 (memtype = DATA).
    NOTE: PROCEDURE used DATASETS (time Total of processes):
    time real 3.74 seconds
    time CPU 0.03 seconds


    88
    89 proc datasets
    90 = work nolist library.
    copy 91 = rosdwp move;
    92 select biplr_up_v1;
    93 of quitting;

    NOTE: Move WORK. BIPLR_UP_V1 to ROSDWP. BIPLR_UP_V1 (memtype = DATA).
    NOTE: Variable labels SAS, formats and lengths are not written to the DBMS tables.
    NOTE: There were 0 read comments from the WORKING data set. BIPLR_UP_V1.
    NOTE: All the data ROSDWP. BIPLR_UP_V1 has 0 comments and variables 1.
    NOTE: PROCEDURE used DATASETS (time Total of processes):
    real 0.32 seconds
    time CPU 0.04 seconds


    94
    95
    96
    97 *****************************************************************************;
    98
    99 * execute (commit) by rosdwp
    100 ******************************************************************************;
    101
    102
    103 proc SQL noprint.
    104, connect to oracle as rosdwp (user = "" & oracle_user. "password =" "& oracle_pass ' buffsize = 32767 path ="rosdwp")
    104. preserve_comments);
    run 105 (alter session set nls_date_format = 'ddmonyyyy') by rosdwp;
    CREATE table biplr_rx like 106
    107 SELECT
    mrb_id 108,
    pcp_spc 109,
    rx_date 110,
    4 the system SAS 11:44 Friday, October 30, 2009

    Mark 111,
    generic, 112
    113 ahfs_cd
    ahfs_dsc 114,
    lbl 115,
    strngth 116,
    UNT 117,
    spc_tx_cls_cd 118,
    119 spc_tx_cls_dsc,
    GCN 120,
    rx_num 121,
    rx_ingrd 122,
    rx_paid 123,
    rx_cnt 124,
    rx_qty 125,
    rx_day 126
    127 rosdwp CONNECTION
    128 (SELECT
    129, middle of the year. UNIQ_MBR_ID as mrb_id,
    130 DB. PRVDR_SPCLTY_DESC as pcp_spc,
    FCP 131. LAST_SRVC_DT as rx_date,
    132 JJ. BRAND_NAME as mark,
    133 JJ. GNRC_NAME as generic,
    134 JJ. AHFS_THRPTC_CLS_CD as ahfs_cd,
    DD 135. AHFS_THRPTC_CLS_DESC as ahfs_dsc,
    136 JJ. LABEL_NAME as lbl,
    137 JJ. STRNGTH_NUM as strngth
    138 JJ. STRNGTH_UNIT_DESC as unt,
    139 JJ. SPECF_THRPTC_CLS_CD as spc_tx_cls_cd,
    140 DD. SPECF_THRPTC_CLS_DESC as spc_tx_cls_dsc,
    141 JJ. GCN_NUM as gcn,
    FCP 142. PRSCRPTN_NUM as rx_num,
    SUM of 143 (FCP. INGRDNT_AMT) as rx_ingrd,
    SUM of 144 (FCP. PD_AMT) as rx_paid,
    $ 145 (FCP. UNIT_SRVC_CNT) as rx_cnt,
    SUM of 146 (FCP. DSPNSD_QTY) as rx_qty,
    SUM of 147 (FCP. DAY_SUPLY_CNT) as rx_day
    148
    149 PHRMCY_CLM_FACT pcf,
    150 MBR_ID_DMNSN environment,
    151 DRUG_DMNSN dd,
    152 PRVDR_DMNSN pd,
    153 biplr_up_v1
    154. WHERE THE
    (155)
    156 (biplr_up_v1.mbr_id = MBR_ID_DMNSN. UNIQ_MBR_ID) and
    157 (PHRMCY_CLM_FACT. FINL_CLM_KEY = PHRMCY_FINL_CLM_DMNSN. FINL_CLM_KEY) AND
    158 (PHRMCY_CLM_FACT. MBR_KEY = MBR_ID_DMNSN. MBR_KEY) and
    159 (PHRMCY_CLM_FACT. BNFT_KEY = MBR_BNFT_DMNSN. BNFT_KEY) and
    160 (PHRMCY_CLM_FACT. DRUG_KEY = DRUG_DMNSN. DRUG_KEY) and
    161 (PHRMCY_FINL_CLM_DMNSN. CLM_ORGN_CD IN (', 'A')) AND
    162 (PHRMCY_CLM_FACT. LAST_SRVC_DT BETWEEN q. & fdos. & q and & q. & ldos. & q)
    163)
    164 Group By
    165 mi. UNIQ_MBR_ID,
    166 pd. PRVDR_SPCLTY_DESC,
    FCP 167. LAST_SRVC_DT,
    168 JJ. BRAND_NAME,
    5 the system SAS 11:44 Friday, October 30, 2009

    169 JJ. GNRC_NAME,
    170 JJ. AHFS_THRPTC_CLS_CD,
    171 JJ. AHFS_THRPTC_CLS_DESC,
    172 JJ. LABEL_NAME,
    173 JJ. STRNGTH_NUM,
    174 JJ. STRNGTH_UNIT_DESC,
    175 JJ. SPECF_THRPTC_CLS_CD,
    176 JJ. SPECF_THRPTC_CLS_DESC,
    177 JJ. GCN_NUM,
    FCP 178. PRSCRPTN_NUM
    179);
    ERROR: ORACLE prepare error: ORA-00936: lack of expression. SQL statement: SELECT middle. UNIQ_MBR_ID as mrb_id,
    RDL PRVDR_SPCLTY_DESC like pcp_spc, FCP. LAST_SRVC_DT as rx_date, JJ. BRAND_NAME as brand, JJ. GNRC_NAME as generic,
    DD. AHFS_THRPTC_CLS_CD like ahfs_cd, JJ. AHFS_THRPTC_CLS_DESC as ahfs_dsc, JJ. LABEL_NAME as lbl, JJ. STRNGTH_NUM as
    strngth, JJ. STRNGTH_UNIT_DESC as unt, JJ. SPECF_THRPTC_CLS_CD as spc_tx_cls_cd, JJ. SPECF_THRPTC_CLS_DESC as
    spc_tx_cls_dsc, JJ. GCN_NUM as gcn, FCP. PRSCRPTN_NUM as rx_num, SUM (FCP. INGRDNT_AMT) as rx_ingrd, SUM (FCP. PD_AMT)
    as rx_paid, SUM (FCP. UNIT_SRVC_CNT) as rx_cnt, SUM (FCP. DSPNSD_QTY) as rx_qty, SUM (FCP. DAY_SUPLY_CNT) as rx_day
    OF PHRMCY_CLM_FACT pcf, MBR_ID_DMNSN mi, DRUG_DMNSN JJ, pd of the PRVDR_DMNSN, biplr_up_v1 () WHERE the
    (biplr_up_v1.mbr_id = MBR_ID_DMNSN. UNIQ_MBR_ID) and (PHRMCY_CLM_FACT. FINL_CLM_KEY =
    PHRMCY_FINL_CLM_DMNSN. FINL_CLM_KEY) AND (PHRMCY_CLM_FACT. MBR_KEY = MBR_ID_DMNSN. MBR_KEY) and
    (PHRMCY_CLM_FACT. BNFT_KEY = MBR_BNFT_DMNSN. BNFT_KEY) and (PHRMCY_CLM_FACT. DRUG_KEY = DRUG_DMNSN. DRUG_KEY) and
    (PHRMCY_FINL_CLM_DMNSN. CLM_ORGN_CD IN (', 'A')) AND (PHRMCY_CLM_FACT. LAST_SRVC_DT BETWEEN ' 01 JUN 2007"
    and 30 SEP 2009') Group By mi. UNIQ_MBR_ID, pd. PRVDR_SPCLTY_DESC, FCP. LAST_SRVC_DT, JJ. BRAND_NAME,
    DD GNRC_NAME, JJ. AHFS_THRPTC_CLS_CD, JJ. AHFS_THRPTC_CLS_DESC, JJ. LABEL_NAME, JJ. STRNGTH_NUM,
    DD STRNGTH_UNIT_DESC, JJ. SPECF_THRPTC_CLS_CD, JJ. SPECF_THRPTC_CLS_DESC, JJ. GCN_NUM, FCP. PRSCRPTN_NUM.
    NOTE: PROC SQL set NOEXEC option and will continue to check the syntax of the instructions.
    180 run (drop table biplr_up_v1) in rosdwp;
    NOTE: Statement is not executed because the NOEXEC option.
    181 disconnect of rosdwp;
    NOTE: Statement is not executed because the NOEXEC option.
    182 of quitting;
    NOTE: The SAS system is stopped at this stage of processing errors.
    NOTE: PROCEDURE used SQL (total duration of processes):
    time real 0.14 seconds
    time CPU 0.03 seconds

    183
    184

    (1) assuming that LAST_SRVC_DT is a column of PHRMCY_CLM_FACT, to precede the table alias "FCP" rather than the full table name. If a table alias is specified in the FROM clause, it should be used rather than the full table name when you reference the columns.
    2) there are two tables in the WHERE clause that do not appear in the FROM clause:

    PHRMCY_FINL_CLM_DMNSN
    MBR_BNFT_DMNSN

    user12142482 wrote:
    Hello again,

    Wish Oracle was a bit more informative. Uses an Institute of SAS product called Enterprise Guide. A "hot fix" has been installed to solve a problem that the product appears unable to save the latest version of the revised code changes (hence "BETWEEN between" remaining even after an earlier edition). In any case, with the change, now get this error:

    «ERROR: ORACLE prepare error: ORA-00904: "PHRMCY_CLM_FACT".» ' LAST_SRVC_DT': invalid identifier. (The log file is displayed below)

    -The-Les restes remains of the error, no matter if code "pass" is used to move the date range to Oracle (which seems correct to the log output below that I believe), or if I hard code the date range in the query SQL PL itself.

    -L' preparation error always appears at the end of the internal SELECTION.
    -L' error of preparation remain, with or without the GROUP BY clause.

    Is there something else I'm missing? Someone suggested a reserve word - but other versions of the ANSI SQL standard, I don't see that is the case. I went to Support SAS and SAS list serve to the University of Georgia, but nothing definite from these sources. Have requested either able to run Oracle directly, outside this SAS Institute product - process.

    Any suggestions are greatly appreciated. Thank you to all the world very much.

    Jeff
    150 OF
    151 PHRMCY_CLM_FACT pcf,


    152 MBR_ID_DMNSN environment,
    153 DRUG_DMNSN dd,
    154 PRVDR_DMNSN pd,
    155 BIPLR_UP_V1 BLPR2
    156. WHERE THE
    157 (BIPLR_UP_V1.mbr_id = MBR_ID_DMNSN. UNIQ_MBR_ID) and
    158 (PHRMCY_CLM_FACT. FINL_CLM_KEY = PHRMCY_FINL_CLM_DMNSN. FINL_CLM_KEY) AND
    159 (PHRMCY_CLM_FACT. MBR_KEY = MBR_ID_DMNSN. MBR_KEY) and
    160 (PHRMCY_CLM_FACT. BNFT_KEY = MBR_BNFT_DMNSN. BNFT_KEY) and
    161 (PHRMCY_CLM_FACT. DRUG_KEY = DRUG_DMNSN. DRUG_KEY) and
    162 (PHRMCY_FINL_CLM_DMNSN. CLM_ORGN_CD IN (', 'A')) AND
    163 (PHRMCY_CLM_FACT. BETWEEN LAST_SRVC_DT & q. & fdos. & q and q & ldos. & q)
    (164);
    ERROR: ORACLE prepare error: ORA-00904: "PHRMCY_CLM_FACT." "' LAST_SRVC_DT ': invalid identifier. SQL statement:

  • ORA-00936: lack of Interface STEP expression for update flag lines

    Hello world!

    We have an interface that retrieves data of essbase and the load into a table target Oracle.

    We use the Modules (KM) following Knowledge:

    LKM Hyperion Essbase DATA SQL

    IKM SQL incremental update

    When we run the interface, at the stage of 'flag to update lines', we get the following error

    Stage: 'make update'

    Error: ORA-00936: lack of expression

    This is definition message tab:

    ODI-1228: Exportar Presupuesto General (integration) task fails on ORACLE ODI_STAGE connection target.

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00936: lack of expression

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)

    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)

    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)

    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)

    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)

    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1115)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)

    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3954)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1539)

    at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)

    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)

    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)

    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)

    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)

    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)

    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2128)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:366)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:292)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:855)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

    to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)

    at java.lang.Thread.run(Thread.java:662)

    This is CODE tab:


    Update HYP_INT. I _TRG_PRESUPUESTO_ESS_GENERAL $

    Set IND_UPDATE = 'U '.

    When there is)

    Select 'X '.

    of HYP_INT. TRG_PRESUPUESTO_ESS_GENERAL T

    where

    )

    We do not know why query created the interface has some missing statements when the sql is created. Do you think that a lack or settings or just something worng or a bug?

    The ODI client version is ODI_11.1.1.7.0_GENERIC_130128.1205


    You give us any suggestions to fix this?

    Any suggestions would be very helpful!


    Thank you


    Ivan Lemus

    Since you're using IKM of SQL incremental update, you must mark a logical key on the fields of your target.

    This key allows the comparison for insert and update.

  • Unable to create a table with virtual columns... Get the error ORA-12899... Suggestions please.

    Hi all

    Here is the create table script, which does not work, error ORA-12899 keep expressing. Please suggest...,.,.

    CREATE TABLE FX_TRANS
    (
    SAGE_TRADE_TYPE VARCHAR2 (50 BYTE),
    UPSTREAM_EXECUTION_TS TIMESTAMP (9).
    LOCAL_TZ VARCHAR2 (20 BYTE),
    GMT_CONV_ENTERED_DT_TS TIMESTAMP (9) ALWAYS GENERATED IN THE FORM ("SONARDBO". "FN_CONVERT_TIMEZONE"("LOCAL_TZ","ENTERED_DT_TS")), "
    GMT_CONV_EXECUTION_DT_TS TIMESTAMP (9) ALWAYS GENERATED IN THE FORM ("SONARDBO". "FN_CONVERT_TIMEZONE"("LOCAL_TZ","UPSTREAM_EXECUTION_TS")), "
    );

    [Error] Running (5:3): ORA-12899: value too large for column 'GMT_CONV_EXECUTION_DT_TS' (actual: 11, maximum: 20)

    [Error] Performance (6:3): ORA-12899: value too large for column 'GMT_CONV_EXECUTION_DT_TS' (actual: 11, maximum: 20)


    Used fucntion Script that I use as a VIRTUAL column expression:

    CREATE OR REPLACE FUNCTION SONARDBO. FN_CONVERT_TIMEZONE
    (
    PI_LOCAL_TZ IN VARCHAR2,
    PI_DT IN TIMESTAMP
    )
    RETURNS THE TIMESTAMP
    DETERMINISTIC
    IS
    LV_TIMESTAMP TIMESTAMP;
    BEGIN
    LV_TIMESTAMP: = CASE WHEN PI_LOCAL_TZ = 'SERGEANT' THEN
    TO_TIMESTAMP (TO_CHAR)
    ((FROM_TZ)
    PI_DT,
    "Asia/Singapore")
    IN THE ZONE IS "GMT"),.
    'YYYY-MM-DD HH. FF H '),'YYYY-MM-DD HH. TZDS FF PM ")"
    WHEN PI_LOCAL_TZ = "GMT" THEN
    TO_TIMESTAMP (TO_CHAR)
    ((FROM_TZ)
    PI_DT,
    "GMT")
    IN THE ZONE IS "GMT"),.
    'YYYY-MM-DD HH. FF H '),'YYYY-MM-DD HH. TZDS FF PM ")"
    WHEN PI_LOCAL_TZ = "IS" THEN
    TO_TIMESTAMP (TO_CHAR)
    ((FROM_TZ)
    PI_DT,
    "America/New_York")
    IN THE ZONE IS "GMT"),.
    'YYYY-MM-DD HH. FF H '),'YYYY-MM-DD HH. TZDS FF PM ")"
    ANOTHER NULL
    END;


    RETURN LV_TIMESTAMP;
    EXCEPTION
    WHILE OTHERS THEN
    LIFT;
    END;
    /

    Thank you very much

    Arpit

    This one worked for me.

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

    drop table FX_TRANS;
    
    CREATE TABLE FX_TRANS (
       SAGE_TRADE_TYPE VARCHAR2 (50 BYTE),
       UPSTREAM_EXECUTION_TS TIMESTAMP (9),
       LOCAL_TZ VARCHAR2 (20 BYTE),
       ENTERED_DT_TS TIMESTAMP (9),
       GMT_CONV_ENTERED_DT_TS timestamp(9)
             GENERATED ALWAYS AS
                (cast ("FN_CONVERT_TIMEZONE" ("LOCAL_TZ", "ENTERED_DT_TS") as timestamp(9))),
       GMT_CONV_EXECUTION_DT_TS timestamp(9)
             GENERATED ALWAYS AS
                (cast("FN_CONVERT_TIMEZONE" ("LOCAL_TZ", "UPSTREAM_EXECUTION_TS") as timestamp(9))));
    
    INSERT INTO fx_trans (SAGE_TRADE_TYPE,
                          UPSTREAM_EXECUTION_TS,
                          LOCAL_TZ,
                          ENTERED_DT_TS)
         VALUES ('A',
                 SYSTIMESTAMP,
                 'SGT',
                 SYSTIMESTAMP + 1 / 24);
    
    commit;
    

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

    See you soon,.

    Manik.

Maybe you are looking for