Error trivial Drives Me Crazy - ORA-00911: invalid character - Oracle 10 g

I have no idea where I was wrong. I get this ORA-00911: invalid character
I looked at the excerpt from tons of times, but could not find a glitch. Code appear nested into a TOAD
CREATE TABLE RoomAssociates
(
     roomAssociatesID           NUMBER(7)                                     , CONSTRAINT roomasso_roomassoid_pk                            PRIMARY KEY(roomAssociatesID)                                                         ,                                                     
     roomID                       NUMBER(7)                                        CONSTRAINT roomasso_roomid_nn                                NOT NULL                                                                                     ,
                                                                                       CONSTRAINT roomasso_roomid_fk                            FOREIGN KEY(roomID) REFERENCES Room(roomID) ON DELETE CASCADE               ,
     roomFacilityID              NUMBER(7)                                      CONSTRAINT roomasso_roomfid_nn                                NOT NULL                                                                                         ,
                                                                                       CONSTRAINT roomasso_roomfid _fk                             FOREIGN KEY(roomFacilityID) REFERENCES RoomFacility(roomFacilityID)          ,
     enSuitID                   NUMBER(7)                                         CONSTRAINT roomasso_ensuitid_nn                             NOT NULL                                                                                          ,
                                                                                       CONSTRAINT roomasso_ensuitid_fk                       FOREIGN KEY(enSuitID) REFERENCES EnSuit(enSuitID)
);

Now, this will work:

CREATE TABLE RoomAssociates
(
     roomAssociatesID           NUMBER(7)                                     , CONSTRAINT roomasso_roomassoid_pk                            PRIMARY KEY(roomAssociatesID)                                                         ,
     roomID                       NUMBER(7)                                        CONSTRAINT roomasso_roomid_nn                                NOT NULL                                                                                     ,
                                                                                       CONSTRAINT roomasso_roomid_fk                            FOREIGN KEY(roomID) REFERENCES Room(roomID) ON DELETE CASCADE               ,
     roomFacilityID              NUMBER(7)                                      CONSTRAINT roomasso_roomfid_nn                                NOT NULL                                                                                         ,
                                                                                       CONSTRAINT roomasso_roomfid_fk                             FOREIGN KEY(roomFacilityID) REFERENCES RoomFacility(roomFacilityID)          ,
     enSuitID                   NUMBER(7)                                         CONSTRAINT roomasso_ensuitid_nn                             NOT NULL                                                                                          ,
                                                                                       CONSTRAINT roomasso_ensuitid_fk                       FOREIGN KEY(enSuitID) REFERENCES EnSuit(enSuitID)
);

The error is here:

CONSTRAINT roomasso_roomfid _fk

Better formatting:

CREATE TABLE RoomAssociates
( roomAssociatesID NUMBER(7), CONSTRAINT roomasso_roomassoid_pk PRIMARY KEY(roomAssociatesID),
  roomID           NUMBER(7)  CONSTRAINT roomasso_roomid_nn     NOT NULL,
                              CONSTRAINT roomasso_roomid_fk FOREIGN KEY(roomID) REFERENCES Room(roomID) ON DELETE CASCADE,
  roomFacilityID   NUMBER(7)  CONSTRAINT roomasso_roomfid_nn NOT NULL,
                              CONSTRAINT roomasso_roomfid_fk FOREIGN KEY(roomFacilityID) REFERENCES RoomFacility(roomFacilityID),
  enSuitID         NUMBER(7)  CONSTRAINT roomasso_ensuitid_nn     NOT NULL,
                              CONSTRAINT roomasso_ensuitid_fk FOREIGN KEY(enSuitID) REFERENCES EnSuit(enSuitID)
);

Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/18/table-elimination-oppure-join-elimination-lottimizzatore-si-libera-della-zavorra/]

Published by: Massimo Ruocchio, December 19, 2009 12:05 AM

Tags: Database

Similar Questions

  • The AUDIT command in, oracle apex (version 4.2.5.00.08), error "ORA-00911: invalid character '.

    I am trying to run

    "AUDIT INSERT, UPDATE, DELETE on emp BY ACCESS WHENEVER SUCCESSFUL;"

    in "SQL commands" on oracle-apex (version 4.2.5.00.08).

    I get the error message ' ORA-00911: invalid character '.

    Can someone tell me the solution for this?

    Apex environment we need to set the database AUDIT_TRAIL to TRUE for the control

    "AUDIT INSERT, UPDATE, DELETE on emp BY ACCESS WHENEVER SUCCESSFUL;"  to work.

    By their Summit, to be able to change the setting of database AUDIT_TRAIL we have to log-in as a DBA from the link "SQL workshop--> utilities--> on the database.

  • ORA-00911: invalid character error.

    Hi all

    I use ODI 11 g and Oracle 11 g.

    I use the query in proc in ODI below. When the data in the table is inserted it says ORA-00911: invalid character error.
    INSERT INTO SD_CAMP
    SELECT DISTINCT CAMPGN_NO, PRODUCT, NULL.
    CAMPG_NAM, trunc (sysdate), trunc (sysdate) + 182
    OF SP_ODI_TEMP;

    I also inserted the value also hard coded in ODI, but it still says the same error.
    Values inserted INTO the SD_CAMP ("'SAS06', ' SBC", NULL, 'SB CUST FFT', TO_DATE('02-NOV-12','DD-MON-YY'),)
    TO_DATE('03-MAY-13','DD-MON-YY'));

    I ran this query in Oracle db but his works very well.

    Any help how to solve this problem?

    Thank you
    Lony

    Put it in two different stages.

  • 911: 42000: java.sql.SQLException: ORA-00911: invalid character

    Hi all

    I am trying to load the data in the 1 table to another using ODI 10 g. My approach is error ed out in step 3 - load data showing the exception below
    911 : 42000 : java.sql.SQLException: ORA-00911: invalid character
    
    java.sql.SQLException: ORA-00911: invalid character
    
    
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
    
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
    
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
    
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
    
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
    
         at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965)
    
         at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
    
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051)
    
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
    
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026)
    
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
    
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
    
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
    
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
    
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    
         at com.sunopsis.dwg.cmd.e.k(e.java)
    
         at com.sunopsis.dwg.cmd.g.A(g.java)
    
         at com.sunopsis.dwg.cmd.e.run(e.java)
    
         at java.lang.Thread.run(Unknown Source)
    When I see the description of the sql that runs to the phase I see below
    select     
         _ACTIVITIES_V.ACTIVITY_ID        C1_ACTIVITY_ID,
         _ACTIVITIES_V.ATTRIBUTE15        C42_ATTRIBUTE15
    from     .COM_ACTIVITIES_V   _ACTIVITIES_V
    where     (1=1)
    OBV when this sql is tried of toad is giving the same error.

    Please advice what's not here


    thnks

    Hello

    In topology-> physical schema Manager, where you set the source of Oracle schema, you left the WORKING PATTERN as empty. Put a schema name in the scheme of work and this. will be preceded by the name of this schema

    Also, for better visibility, you change the table alias name in the interface of
    ACTIVITIESV
    TO
    ACTIVITIES_V

    Thank you
    Fati

  • ORA-00911: invalid character in SQL dynamic

    I think I need another set of eyes. I do not see the invalid character in this dynamically generated SQL statement:

    INSERT INTO source_arc
    select v.*, sysdate, 'archived'
    from source v
    where v.id IN  ( SELECT *
                             FROM TABLE( SELECT
                                    CAST(str2tbl( 1,2,4 )
                                                 AS myTableType
                                       )
                                         FROM
                                              dual ));
    

    Here is the complete configuration:

    create or replace type myTableType as table of number;
    /
    
    
    create or replace function str2tbl( p_str in varchar2 ) return myTableType
     as
         l_str   varchar2(32767) default p_str || ',';
         l_n        number;
         l_data    myTableType := myTabletype();
     begin
         loop
             l_n := instr( l_str, ',' );
             exit when (nvl(l_n,0) = 0);
             l_data.extend;
             l_data( l_data.count ) := trim(substr(l_str,1,l_n-1));
             l_str := substr( l_str, l_n+1 );
         end loop;
         return l_data;
     end str2tbl;
     /
    
     create table source
     ( id   number
      ,txt  varchar2(25)
     )
     /
    
     insert into source
     values(1,'aaa')
     /
    
     insert into source
     values(2,'bbb')
     /
    
     insert into source
     values(3,'ccc')
     /
    
     insert into source
     values(4,'ddd')
     /
    
     insert into source
     values(5,'eee')
     /
    
     commit ;
    
     create table source_arc
     ( id  number
      ,txt varchar2(25)
      ,dt  date
      ,comments varchar2(512)
     )
     /
    

    )

    /

    Here is the result when I run this code:

    DECLARE
       i_owner_tbl_arc varchar2(61) := 'source_arc';
       i_owner_tbl     varchar2(61) := 'source' ;
       v_qry       varchar2(32767) := 'INSERT INTO ' ||  i_owner_tbl_arc ;
       g_content_list varchar2(32767) := '1,2,4';
    BEGIN
       v_qry := v_qry || chr(10) ||
           'select v.*, sysdate, ''archived'' ' || chr(10) ||
           'from ' || i_owner_tbl || ' v '      || chr(10) ||
           'where v.id IN  ( SELECT * ' || chr(10) ||
           '                         FROM TABLE( SELECT ' || chr(10) ||
           '                                          CAST(str2tbl( ' || g_content_list || ' ) ' || chr(10) ||
           '                                             AS myTableType ' || chr(10) ||
           '                                   ) ' || chr(10) ||
           '                                     FROM dual ));';
           
           execute immediate v_qry;
    END ;
    /
    ERROR at line 1:
    ORA-00911: invalid character
    ORA-06512: at line 17
    

    Any help appreciated.

    Remove the semicolon at the end of the string and put single quotes while calling the function.

    Try the below

    DECLARE

    i_owner_tbl_arc varchar2 (61): = "source_arc";

    i_owner_tbl varchar2 (61): = 'source ';

    v_qry varchar2 (32767): = 'INSERT INTO ' |  i_owner_tbl_arc;

    g_content_list varchar2 (32767): = '1,2,4';

    BEGIN

    v_qry: = v_qry | Chr (10) |

    "select v.*, sysdate,"archived"| Chr (10) |

    'from ' | i_owner_tbl | ' v '      || Chr (10) |

    «where v.id IN (SELECT * ' |)» Chr (10) |

    ' TABLE (SELECT ' |) Chr (10) |

    "CAST (str2tbl ("' |)) ". g_content_list | ''' ) ' || Chr (10) |

    '                                             AS myTableType ' || Chr (10) |

    '                                   ) ' || Chr (10) |

    '                                     FROM dual ))';

    immediately run v_qry;

    END;

  • ORA-00911: invalid character in DBMS_SQLTUNE. REPORT_TUNING_TASK 11.2.0.1

    DECLARE
     my_task_name VARCHAR2(30);
     my_sqltext   CLOB;
    BEGIN
     my_sqltext := 'select l.cp_name, (select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''committed'' and e.mop_id=l.id) as Committed, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''published'' and e.mop_id=l.id) as Published, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''quarantined'' and e.mop_id=l.id) as Quarantined, '||
    '(select count(distinct e.youview_id)  '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''expiredFromQuarantine'' and e.mop_id=l.id) as Expired, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''failed'' and e.mop_id=l.id) as Failed, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id  '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''valid'' and e.mop_id=l.id) as Valid, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''invalid'' and e.mop_id=l.id) as Invalid, '||
    '(select count(distinct e.youview_id)  '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and e.mop_id=l.id) as Total '||
    'from mips_mdm.mop_lookup l order by l.id;';
     my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(
             sql_text    => my_sqltext,
             user_name   => 'MIPS_MDM',
             scope       => 'COMPREHENSIVE',
             time_limit  => 60,
             task_name   => 'my_sql_tuning_taskMIPS4',
             description => 'Task to tune a query on a specified employee');
    END;
    /
    
    
    
    SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_taskMIPS4')
      FROM DUAL;
      
    
    GENERAL INFORMATION SECTION
    -------------------------------------------------------------------------------
    Tuning Task Name   : my_sql_tuning_taskMIPS4
    Tuning Task Owner  : DEPLOY_CTL
    Workload Type      : Single SQL Statement
    Scope              : COMPREHENSIVE
    Time Limit(seconds): 60
    Completion Status  : COMPLETED
    Started at         : 05/24/2011 10:31:59
    Completed at       : 05/24/2011 10:32:53
    
    -------------------------------------------------------------------------------
    Schema Name: MIPS_MDM
    SQL ID     : 9246fjyc01k83
    SQL Text   : select l.cp_name, (select count(distinct e.youview_id) from
                 mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on
                 e.youview_id = s.youview_id where e.date_created <
                 TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='committed' and e.mop_id=l.id) as Committed, (select
                 count(distinct e.youview_id) from mips_mdm.entity_lookup e inner
                 join mips_mdm.tx_status s on e.youview_id = s.youview_id where
                 e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='published' and e.mop_id=l.id) as Published, (select
                 count(distinct e.youview_id) from mips_mdm.entity_lookup e inner
                 join mips_mdm.tx_status s on e.youview_id = s.youview_id where
                 e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='quarantined' and e.mop_id=l.id) as Quarantined,
                 (select count(distinct e.youview_id)  from
                 mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on
                 e.youview_id = s.youview_id where e.date_created <
                 TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='expiredFromQuarantine' and e.mop_id=l.id) as Expired,
                 (select count(distinct e.youview_id) from mips_mdm.entity_lookup
                 e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id
                 where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011
                 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM')
                 and s.status='failed' and e.mop_id=l.id) as Failed, (select
                 count(distinct e.youview_id) from mips_mdm.entity_lookup e inner
                 join mips_mdm.tx_status s on e.youview_id = s.youview_id  where
                 e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='valid'
                 and e.mop_id=l.id) as Valid, (select count(distinct
                 e.youview_id) from mips_mdm.entity_lookup e inner join
                 mips_mdm.tx_status s on e.youview_id = s.youview_id where
                 e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='invalid' and e.mop_id=l.id) as Invalid, (select
                 count(distinct e.youview_id)  from mips_mdm.entity_lookup e
                 inner join mips_mdm.tx_status s on e.youview_id = s.youview_id
                 where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011
                 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM')
                 and e.mop_id=l.id) as Total from mips_mdm.mop_lookup l order by
                 l.id;
    
    -------------------------------------------------------------------------------
    ERRORS SECTION
    -------------------------------------------------------------------------------
    - ORA-00911: invalid character
    
    -------------------------------------------------------------------------------
    Please can I know what is cauing this error to occur in SQL tunning games.

    Published by: BluShadow on May 24, 2011 11:13
    addition of {noformat}
    {noformat} tags                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    >
    "of mips_mdm.mop_lookup the order by l.id;"
    >

    Try to remove the semicolon ';' sql statement (quoted string) and re - run.

    Thank you

    REDA

  • ORA-00911: invalid character

    Hello world

    I create procedures in ODI so I could execute the PL/SQL code on my tables in ODI.

    I tested this stored procedure directly on SQL Developer and it works, but once I put in on a procedure ODI he does not work and gives me an ORA-00911

    So what I did, is that I took this same code and it has run on SQL Developer and it runs quite rightly!

    Any ideas? or sugestion? I really appreciate your time and your advice.

    Best regards.

    Parto of the SP (stored procedure) code:
    All the X are the ABC characters, so there just letters and vowels from A to Z.

    create or replace
    PROCEDURE MY_BEAUTIFUL_SP AS

    BEGIN

    XXXXXX XXXX XXX_X_XXX_2
    XXXXXX XXXX XX MOMO605,
    XXXXXXX_XX XX XXXX,
    XXX_XXX_XX XX XXXX,
    (XXX_XXXXX) XXX XX X_XXX_XXX_X,
    X_XXX_XXX_XXX_X XX XXXX,
    XXXXXXX_XXXX XX XXXXXXX,
    "XXX XXXXXXXXXXXX XXXXXXXXXXXX" XX XXX_XXX_XXXX
    XXX_X_XXX_XXX XXXX
    XXXXXXX XXXXXXX XXXXX
    (
    XXX_XXXXX XXX XXXXXXX XX
    (
    XXXXXXXXXX_XXXXX_XXXX XX 'XXXXXXXXX XXXXX + XXXX. "
    XXXXXXXXX_XXXXX XX 'XXXXXXXXX XXXXX. "
    XXXX XX "XXXX."
    XXXXXX_XXXXX XX "XXXXX."
    XXXXXXXX XX "XXXXXXXX"
    XXXXXXXX XX "XXXXXXXX"
    XXXXX XX "XXXXX."
    XXX_XXXXXXXXXXX XX 'XXX XXXXXXXXXXX. "
    XXXXXXXX XX "XXXXXXXX"
    XXX_XXXXXXX XX 'XXX_XXXXXXX. "
    XX XX "XX."
    XXXXXXXXXXXX XX "XXXXXXXXXXX",.
    XX XXX "XXX".
    )
    )
    XX_XX_XXX = "XXX XXXXXXXXXXXX XXXXXXXXXXXX" XXXXX
    XX XXXXX XXXXXXX, XX_XX_XXX;

    COMMIT;
    END MY_BEAUTIFUL_SP;

    Remove the ';' after VALIDATION and the END MY_BEAUTIFUL_SP

    Also, it is best to have your pl/sql code created at the level of the DB... i.e. of procedure/function and then in ODI you put him on the breast
    BEGIN

    and

    END;

    The main advantage, if in the future, you want to make some changes in the part of pl/sql, you can do it from DB and there is no need to generate ODI scenario

    Thank you
    Fati

  • Error: ORA-00911: invalid character. Where is the character?

    Hi all

    As I wrote in the topic, I wrote the following code but I get the above error.

    Could someone tell me where are the mistakes? Mainly because the console does not specify where it is.

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

    Select case when ((select EMPRESA

    of B_LISTA_EMPLEADOS

    where USERNAME = 'ADMIN')) = 'IMASA.

    then ((select JORNADA_ANUAL

    of B_JORNADAS_Y_RATIOS

    where CATEGORY = (())

    Select the CATEGORY

    of B_LISTA_EMPLEADOS

    where USERNAME = 'ADMIN '.

    ))

    and EMPRESA = (())

    Select the EMPRESA

    of B_LISTA_EMPLEADOS

    where USERNAME = 'ADMIN '.

    ))

    and ANO = "2013"

    ))

    else 'no es UN empleado of the empresa"

    end case;


    like the Jornada

    of B_JORNADAS_Y_RATIOS

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

    Best regards

    Hello

    Is type data number JORNADA_ANUAL?


    then try to_char (JORNADA_ANUAL)

  • If I run my query in Oracle, it runs without error, but when I run inside c# gives ORA-00911: invalid character

    I like to run below myQuery in c#, but saw the error. No idea what is the problem? If I'm running myQuery in Oracle, it runs without error. "I put all the +" before starting the myQuery line and "end of the line. but nothing changes.

    myQuery =

    with the CBC as

    (

    Select src.table_name src_table_name, src.column_name src_col_name, src.data_type src_data_type, src.data_length src_data_len, src.data_precision src_data_precision, src.data_scale src_data_scale,

    CBC. Nullable src_nullable, decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as src_cons

    all_tab_columns CBC

    left join (select Cc.Column_Name, Uc.Constraint_Type

    of user_cons_columns cc, uc user_constraints

    where Cc.Constraint_Name = Uc.Constraint_Name

    and Cc.Table_Name = Uc.Table_Name) t

    on T.Column_Name = Src.Column_Name

    where table_name = 'INSTRUCTOR' and owner = "ERHAN"

    ),

    As TGT

    (

    Select tgt.table_name tgt_table_name, tgt.column_name tgt_col_name, tgt.data_type tgt_data_type, tgt.data_length tgt_data_len,

    TGT.data_precision tgt_data_precision, tgt.data_scale tgt_data_scale, tgt.nullable tgt_nullable,

    Decode (T.Constraint_Type, 'P', 'Primary Key', 'U', 'Unique', ") as tgt_cons

    from all_tab_columns tgt

    left join (select Cc.Column_Name, Uc.Constraint_Type

    of user_cons_columns cc, uc user_constraints

    where Cc.Constraint_Name = Uc.Constraint_Name

    and Cc.Table_Name = Uc.Table_Name) t

    on T.Column_Name = TGT. Column_Name

    where table_name = 'INSTRUCTOR' and owner = "SARIGUL"

    ),

    col_details as

    (

    Select src.src_table_name, nvl (tgt.tgt_table_name, first_value (tgt_table_name) more (order of nulls last tgt_table_name)) tgt_table_name;

    SRC.src_col_name, src.src_data_type, src.src_data_len, src.src_data_precision, src.src_data_scale, src.src_nullable, src_cons,

    TGT.tgt_col_name, tgt.tgt_data_type, tgt.tgt_data_len, tgt.tgt_data_precision, tgt.tgt_data_scale, tgt.tgt_nullable, tgt_cons

    the CBC

    outer join full tgt

    on)

    SRC.src_col_name = tgt.tgt_col_name

    )

    )

    Select *.

    de)

    Select the case sensitive option

    When tgt_data_type! = src_data_type or tgt_data_len! = src_data_len or tgt_data_precision! = src_data_precision or tgt_data_scale! = src_data_scale or tgt_nullable! = src_nullable

    then 'alter table ' | tgt_table_name | 'Edit ' | tgt_col_name | ' ' || src_data_type | ' ' ||

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then ' (' |) NVL (to_char (src_data_len), ' ') | ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    ||

    cases where tgt_nullable = 'Y' then 'null '.

    of another end 'not null '.

    || tgt_cons

    When tgt_col_name is null

    then 'alter table ' | tgt_table_name | 'Add ' | src_col_name | ' ' ||  ' ' || ' ' || src_data_type | ' ' ||

    -case when src_data_type null ('DATE') then

    on the other

    case

    When src_data_type in ('VARCHAR', 'VARCHAR2')

    then ' ('| nvl (to_char (src_data_len), ' ') |) ') '

    otherwise decode (nvl (src_data_precision-1),-1, null, nvl (to_char (src_data_precision), ' ') |) ', ' || NVL (to_char (src_data_scale), ' ') | ')')

    end

    end

    || tgt_cons

    When src_col_name is null

    then 'alter table' | tgt_table_name: ' drop '. tgt_col_name

    end alter_statement

    of col_details

    )

    where alter_statement is not null;

    using (OracleConnection conn1 = new OracleConnection (connectionString))

    {

    conn1. Open();

    Dim myQuery = "";

    using (OracleCommand = new OracleCommand (myQuery, conn1) crtCommand)

    {

    richTextBox1.AppendText (output);

    richTextBox1.AppendText (crtCommand.ExecuteNonQuery (). (ToString());

    richTextBox1.AppendText (output);

    }

    }

    VR;

    myQuery=
    @"with src as
    (
    ...
    ";
    

    That means a @ before the beginning of a string literal mean? -C# Foire - Site Home - MSDN Articles

    as an example

    OracleCommand cmd = con.CreateCommand();
    cmd.CommandText = @"begin apps.mo_global.init('SQLAP'); begin apps.fnd_global.apps_initialize(5710, 20639, 200); end; end;";
    cmd.ExecuteNonQuery();
    

    richTextBox1.AppendText (crtCommand.ExecuteNonQuery (). (ToString());                            

    is this correct? Not sure

    as example try

     using (OracleConnection conn1 = new OracleConnection(connectionString))
    {
        conn1.Open();
    
        string myQuery = "......";                  
    
        using (OracleCommand crtCommand = new OracleCommand(myQuery, conn1))
            {
                richTextBox1.AppendText(Environment.NewLine);
                // richTextBox1.AppendText(crtCommand.ExecuteNonQuery().ToString());
    
    OracleDataReader reader = crtCommand.ExecuteReader();
    while (reader.Read())
      {
        richTextBox1.AppendText(reader.GetString(0));
        // may be also
        // richTextBox1.AppendText(Environment.NewLine);
      }
    
                richTextBox1.AppendText(Environment.NewLine);
    
            reader.Dispose();
            cmd.Dispose();
            }
    
        con.Dispose();
    }
    
  • Problem of data model ORA-00911: invalid character

    I am confronted with error when I run beep

    Help me


    < name of dataTemplate = "SrBysrtype" description = "ServiceRequestBySrtype" than one dataSourceRef = 'demo' defaultPackage = "BIP_DateRange" >
    < Parameters >
    < name of the parameter 'p_Fromsrdate' = 'char' dataType = / >
    < name of the parameter 'p_Tosrdate' = 'char' dataType = / >
    < / Parameter >
    < dataQuery >
    < SQLStatement instance name = "Q1" >
    <! [CDATA]
    SELECT
    incident. Incident_Number as ServiceRequestNumber,
    To_char (incident.incident_date,'DD-MON-YYYY "") as ServiceRequestDate,
    incident. Summary summary,
    agenttime. AgentName as Nom_agent,
    TO_CHAR (agenttime.agentstarttime,'DD-MM-YYYY HH24:MI:SS) as StartTime.
    TO_CHAR (to_date('00:00:00','HH24:mi:SS') +)
    (agenttime. EndTime - agenttime.agentstarttime), "HH24:MI:SS") as TimeSpent
    OF cs_incidents_all_b the incident cs_agenttime_agv agenttime, where & srwhereclause;]] >
    < / sqlStatement >
    < / dataQuery >
    < name dataTrigger = "beforeReport" source = "BIP_DateRange.BeforeReport ()" / >
    < dataStructure >
    < name of group = "G_SR" datatype = "varchar2" source = "Q1" >
    < element name = "Incident_Number" value = "ServiceRequestNumber" / >
    < element name = "Incident_date" value = "ServiceRequestDate" / >
    < element name = "Summary" value = "Summary" / >
    < element name = "nom_agent" value = "Nom_agent" / >
    < element name = "agentstarttime" value = "StartTime" / >
    < element name = "AgentDuration" value = "TimeSpent" / >
    < / Group >
    < / dataStructure >
    < / dataTemplate >





    create or replace
    package BIP_DateRange as

    srwhereclause varchar2 (1000): = ' ';
    p_Fromsrdate varchar2 (400);
    p_Tosrdate varchar2 (400);

    function BeforeReport return Boolean;

    end BIP_DateRange;




    create or replace
    package body BIP_DateRange as

    function boolean return BeforeReport is
    Start

    If p_Fromsrdate is not null then
    srwhereclause: = 'agenttime.incident_id = incident.incident_id | ' AND incident.incident_date between TO_DATE ('| p_Fromsrdate |', "DD-MON-YYYY")';
    end if;
    If p_Tosrdate is not null then
    srwhereclause: = srwhereclause | "AND TO_DATE ('| p_Tosrdate |',"DD-MON-YYYY")';
    end if;
    Returns true;
    end;

    end BIP_DateRange;




    help me I am new to BEEP with data model

    Hmm, can you send me an email to [email protected] please?

    I think that there are two different methods. In fact I have no test system for this here at the moment, so I can't try for me...

    Add two parameters to your package specifications:

    >
    create or replace
    package BIP_DateRange as

    srwhereclause varchar2 (1000): = '1 = 1';
    P_FROM varchar2 (400);
    p_to varchar2 (400);
    p_fromdate varchar2 (400);
    p_todate varchar2 (400);

    function beforereport (p_from varchar2, p_to in varchar2) return Boolean;

    end BIP_DateRange;

  • Stop error that drives me crazy.

    2 PCs, one a significant improvement. Vista - 7, same error. Old a core Athlon 2, Evga 9800. New Athlon x 8, Radeon 7950. Problem signature: problem event name: BlueScreen OS Version: 6.1.7601.2.1.0.768.3 locale ID: 1033 additional information about the problem: BCCode: 1000007e BCP1: FFFFFFFFC0000094 BCP2: FFFFF88007996783 BCP3: FFFFF88002EA4668 BCP4: FFFFF88002EA3EC0 OS Version: 6_1_7601 Service Pack: 1_0 product: 768_1 files that help describe the problem: C:\Windows\Minidump\060713-18439-01.dmp C:\Users\Robert\AppData\Local\Temp\WER-31980-0.sysdata.xml I went through the drivers. RAM check, scan Temp, HDD check, Windows error checking. Still do. Near as I can tell, it occurs during playback of Final Fantasy 11. At any time. Short play, long game. I literally, I can't find what I can only assume to be a clash of pilot. I've updated, cleaned, removed... Stable for 1 to 2 days... then bam, BSoD. Did the same thing on my last PC, very different material. Everything is new on my new rig. No problem to play anything from other 'So Far'. Old would like to * outside, only occasionally web navigation and playback of other games. This is driving me crazy bats@#$, trying to find the error. On average once per day of BSoD on FFxi, no problem to do something else never (yet) on the new organization. This would lead to say ' well... the problem must this game! " Maybe... but why? Sometimes without error. The two roommates, one on a platform near mine in the material... no problems. So please, Help! I checked that registrations for the locale and the BCCode... say it's probably a driver! So, can I get a helping hand from someone who can translate my copy paste into something that I can find? Please and thank you.

    VG

    Can't help you with the drivers, I am not a gamer.  If this controller driver is the only one then you will have to re - install in compatibility mode.

    As for the others you really tried google?  There are about 25,000 possible sites and only the first page, or are those who try to sell you something.

    To run in compatibility mode do the following:

    Click with the right button on the installer > properties > compatibility > choose OS

    http://Windows.Microsoft.com/en-us/Windows-Vista/make-older-programs-run-in-this-version-of-Windows?SignedIn=1

  • V.18 Illustrator CC (unknown error CANT / Unknown error MIT) drives me crazy!

    Hello

    I installed Illustrator CC v18 a few months ago and I was using it normally.

    I use Windows 8.1

    My operating system language is Spanish (I'm in Spain)

    The language of my Illustrator is also Spanish

    So today I wanted to install a graphic style, which I downloaded from a Web site, and I installed it. Just use the menu of libraries to find the .ai file in which are contained the styles... and then found the .ai file and selected to open it, so I loaded styles, as always. What's happened is this .ai file destroyed my Illustrator. Exactly what happened is this:

    When I searched for the file .ai with styles... and loaded it... in the menu of libraries...

    1 illustrator did not open any library of styles... nothing happened...

    2. then libraries button has been disabled, even if you pressed on top, was completely impossible to make it work...

    So I decided to close illustrator and restart my PC

    After my PC restarted... I tried to launch Adobe Illustrator and what has happened is that illustrator doesn't work well anymore.

    It is as if this style "screwed up everything" inside the Illustrator, and now it gives me many mistakes CANT and MIT!

    Sorry, but hell ARE these errors and CANT... Unknown error...

    3. so I create a new document, I get a CANT and a mistake MIT...

    4. the default styles are not displayed correctly after these errors...

    5. Finally if I create a blank document, and then, when I am drawing something I get screens increasingly bothering me with error CANT... Error CANT...

    ????

    I'm really confused and do not know what to do.

    I have panic to illustrator to uninstall and reinstall again.

    If someone could help me please to solve this problem, I would really be greateful.

    See you soon

    Jacob, you provided a solution to this problem in the past, without having to reinstall the software. I applied your solution... and I think I solved the problem.

    Don't remember you said that some users move Illustrator preference settings?

    I searched the forum and found a job in which you suggested that.

    Anyway... to make easier how solve the problem here is the solution.

    WELL, I THINK I FINALLY FOUND A SOLUTION FOR THE CANT OF UKNOWN ERROR / MIT ERROR UNKNOWN

    * SOLUTION POSSIBLE FOR THE ERROR UNKNOWN CANT / MIT UNKNOWN ERROR IN ADOBE ILLUSTRATOR CC * NO NEED TO UNINSTALL OR REINSTALL anything. ONLY 2-5 MINUTES TO SOLVE IT.

    • With this solution you will not have to uninstall and reinstall anything.
    • It takes just a few minutes.
    • This solution has been possible thanks to this site:

    Illustrator tips

    Move the folder: When things get strange.


    For Illustrator CC *.


    ERROR:


    • ERROR UNKNOWN CANT
    • UNKNOWN ERROR MIT

    SYMPTOMS: After some time of use, Adobe Illustrator CC does much more and display an ERROR UNKNOWN CANT... or UNKNOWN MIT ERROR... or both... This could happen unexpectedly, or simply by loading the graphic styles developed by a third party.

    POSSIBLE CAUSE: The corruption of the preference of the files inside the folder settings Adobe Illustrator CC.

    TIME TO FIX IT: 2 to 5 minutes. NO NEED TO UNINSTALL OR REINSTALL ANYTHING *.

    DIFFICULTY: Easy

    SOLUTION:

    1. Close Adobe Illustrator CC if it is already open
    2. Go to \AppData\Roaming\Adobe C:\Users\
    3. Please note the Windows to create folder with the identifier that you use in Windows
    4. In the \Adobe folder, navigate to the folder... Adobe Illustrator XX Settings, where XX represents the version of Adobe Illustrator, for example Adobe Illustrator 18 settings or Adobe Illustrator 19
    5. Then, move this folder on your desktop
    6. Preserve this folder moved in your office, so on later, you can browse it and recover workspaces already saved (optional)
    7. Now open Adobe Illustrator CC, it will automatically create a new settings file, reset all factory values, without the need to reinstall.
    8. Unknown error CANT or MIT now does not appear anymore.

    WORKSPACES (OPTIONAL) TRANSFER:

    • If you have multiple workspaces, due, we reset Illustrator to the factory default values, you will find more of your workspaces. HOWEVER, WE CAN RECOVER'EM.
    • Workspaces are stored in the folder \Adobe Illustrator XX Settings\en_US\x64\workspaces (for users in the United States) where XX stand for the version of Illustrator... 17... 18... 19... etc.
    • For Spanish users of Spain, 'trabajo espacios' workspaces are stored in the folder Adobe Illustrator XX Settings\es_ES\x64\Espacios of trabajo where XX stand for the version of Illustrator... 17... 18... 19... etc.
    • To recover your work spaces just go to the folder of Illustrator, that we have already placed in your office... and navigate to the workspace folder
    • For users in the United States... \Adobe Illustrator XX Settings\en_US\x64\workspaces
    • For Spanish users of Spain... Adobe Illustrator 18 Settings\es_ES\x64\Espacios of work
    • It copy all the files of your workspaces created earlier...
    • Now go to the folder on the nine parameters for Illustrator, Illustrator CC created on your hard drive...
    • It should be placed in (the United States users)\AppData\Roaming\Adobe\Adobe Illustrator XX Settings\en_US\x64\workspaces C:\Users\
    • For Spanish users of C:\Users\ Spaintrabajo \AppData\Roaming\Adobe\Adobe Illustrator XX Settings\es_ES\x64\Espacios
    • Now, in the Workspaces folder, paste all files Word spaces that you copied into your folder of Office workspaces
    • Fact


  • Error number return when and ORA: 01722 invalid

    Hi people, I posted this under another topic as well as eBusiness suite so apologies if some you've seen, but I would really appreciate the help on this one. Any suggestions are welcome.

    We strive to create a calculation that returns the number of days of absence a person has had in a given period of time. We need answer these absences which began before the period and are closed during it, lack that begins during the period and ends after she and those that open and close that it contains.

    The period is always a rolling 6 months from sysdate.

    It's the calc we found so far that works for some people, but we get the error invalid number if the absence includes a half-day - so 0.5, 1.5, etc..

    It's probably more complicated, but we are not the techno at all so learn we will!

    We use the business district of HRMS - Administration - Oracle Human Resources (Core) 10G and the folders present Absence and nobody.

    SUM (TO_NUMBER (NVL ((CASES WHERE the Attendance.Actual Absence Start Date < TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY') THEN (BOX WHEN presence Absence.)))) "" Actual end date ' > SYSDATE SO (WORKING_DAYS_BETWEEN (TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY'), SYSDATE)) else (CASE WHEN (BOX WHEN TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY') > = Absence Start Date of Attendance.Actual THEN (WORKING_DAYS_BETWEEN (TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY'), presence of Absence.)))) (("" Actual end date ")) ELSE (CASE WHEN (WORKING_DAYS_BETWEEN (Start Date of Attendance.Actual of Absence, presence of Absence." Actual end date")) IS NULL SO (WORKING_DAYS_BETWEEN (Attendance.Actual of Absence Start Date, SYSDATE)) ELSE (BOX WHEN SYSDATE < = presence Absence.) "" Actual end date ' THEN (WORKING_DAYS_BETWEEN (Attendance.Actual of Absence Start Date, SYSDATE)) ELSE (WORKING_DAYS_BETWEEN (Start Date of Attendance.Actual of Absence, presence of Absence." (((Actual end date")) END) END) END) IS NULL SO (WORKING_DAYS_BETWEEN (TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY'), SYSDATE)) else (BOX WHEN TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY') > = Absence Start Date of Attendance.Actual THEN (WORKING_DAYS_BETWEEN (TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY'), presence Absence.))) (("" Actual end date ")) ELSE (CASE WHEN (WORKING_DAYS_BETWEEN (Start Date of Attendance.Actual of Absence, presence of Absence." Actual end date")) IS NULL SO (WORKING_DAYS_BETWEEN (Attendance.Actual of Absence Start Date, SYSDATE)) ELSE (BOX WHEN SYSDATE < = presence Absence.) "" Actual end date ' THEN (WORKING_DAYS_BETWEEN (Attendance.Actual of Absence Start Date, SYSDATE)) ELSE (WORKING_DAYS_BETWEEN (Start Date of Attendance.Actual of Absence, presence of Absence." (((((Actual end date")) END) END) END) END) END) else (WHEN BOX (BOX WHEN TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY') > = Absence Start Date of Attendance.Actual THEN (WORKING_DAYS_BETWEEN (TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY'), presence Absence.)))) (("" Actual end date ")) ELSE (CASE WHEN (WORKING_DAYS_BETWEEN (Start Date of Attendance.Actual of Absence, presence of Absence." Actual end date")) IS NULL SO (WORKING_DAYS_BETWEEN (Attendance.Actual of Absence Start Date, SYSDATE)) ELSE (BOX WHEN SYSDATE < = presence Absence.) "" Actual end date ' THEN (WORKING_DAYS_BETWEEN (Attendance.Actual of Absence Start Date, SYSDATE)) ELSE (WORKING_DAYS_BETWEEN (Start Date of Attendance.Actual of Absence, presence of Absence." (((Actual end date")) END) END) END) IS NULL SO (WORKING_DAYS_BETWEEN (TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY'), SYSDATE)) else (BOX WHEN TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY') > = Absence Start Date of Attendance.Actual THEN (WORKING_DAYS_BETWEEN (TO_DATE (ADD_MONTHS (SYSDATE,-6), 'DD-Mon-YYYY'), presence Absence.))) (("" Actual end date ")) ELSE (CASE WHEN (WORKING_DAYS_BETWEEN (Start Date of Attendance.Actual of Absence, presence of Absence." Actual end date")) IS NULL SO (WORKING_DAYS_BETWEEN (Attendance.Actual of Absence Start Date, SYSDATE)) ELSE (BOX WHEN SYSDATE < = presence Absence.) (("" END END END END END actual end Date ' THEN (WORKING_DAYS_BETWEEN (Attendance.Actual of Absence Start Date, SYSDATE)) ELSE (lack Attendance.Duration days))), (DAYS_BETWEEN (Start Date of Attendance.Actual of Absence, presence of Absence." ((Actual end date'))), '999999990 D 00'))

    Hello

    It could be that it's because you use SYSDATE that contains both as a fraction and not trunc (sysdate) that contains at present. It could be that your working_dates_between triggers this error.

    However, your formula is much more complicated that it should be.

    First of all, you want to watch the ADD_MONTHS (TRUNC (SYSDATE),-6) date at trunc (sysdate). So, you want to look the part of the absence which is located in the time stamp. It's the BIGGEST (Absence Attendance.Actual Start Date, ADD_MONTHS (TRUNC (SYSDATE),-6)) to LEAST (NVL (lack of attendance. (("" Actual end Date ", TRUNC (SYSDATE)), TRUNC (SYSDATE)). You may need to add 1 to the end of absence date because it is the last day of their absence, and not the date of their return. It depends on how you calculate the days between the beginning and the end
    Date of the absence. You can create calculations for the date of beginning and end of the absences in the time window of 6 months. Create the AbsenceStart calculation as

    Greatest (attendance absence. Actual Start date, ADD_MONTHS (trunc (sysdate),-6))

    and AbsenceEnd as

    LESS (NVL (lack of attendance. (("" Actual end Date ", TRUNC (SYSDATE)), TRUNC (SYSDATE))

    Next, you need to pick up only lack what part of the absence in your 6 months date window. To do this, you can use a condition in the workbook or a condition in a statement box. You must then calculate the difference between those dates and SUM all values.

    SUM (CASE WHEN AbsenceEnd > = AbsenceStart THEN WORKING_DAYS_BETWEEN (AbsenceStart, AbsenceEnd) END)

    That's all. Not so complicated after all.

    Rod West

  • ORA-00911 during addition of comment in the SQL command.

    I work within the ORACLE Database Express Edition page "SQL Command".

    The following query works fine for me:

    SELECT *.
    CUSTOMERS

    As soon as I add comments, I get an error ORA-00911:

    -It is a comment.
    --
    SELECT *.
    CUSTOMERS

    ORA-00911: invalid character

    Hello

    Apex SQL worksheet don't like comments. What is reason you like add comments when you run the query?
    You can try

    SELECT *
    /*This is a comment.*/
    FROM CUSTOMERS
    

    Kind regards
    Jari

  • error "invalid character" using the database link

    Hello!

    I use db 9.2 and trying to connect to a 10g database.
    I created the db link... when I use it (select * from table@dblink), an error occurred: ORA-00911 invalid character. It does not accept the '@'!

    I tried to use it on sql * plus, worked well...

    Any ideas?
    Thank you!

    Can you try to set America/America in preferences - Database - NLS?

    Hope that helps,
    K.

Maybe you are looking for