ORA-02236: invalid filename when creating redo eve

I'm getting ora-02236 creating again Eve... Why is it so?

SQL > select * from v version $;

BANNER

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

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

PL/SQL Release 10.2.0.1.0 - Production

CORE 10.2.0.1.0 Production

AMT for Linux: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 - Production

SQL > 300 fixed lines;

SQL > set 300 pages;

SQL > /.

GROUP # STATUS TYPE MEMBER IS_

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

/ U01/oracle/oradata/HITHA/redo No. 3 online

03 journal

/ U01/oracle/oradata/HITHA/redo No. 2 online

02.Markus newspaper

1/u01/oracle/oradata/HITHA/redo STALE in LINE No.

01.intro newspaper

SQL > select bytes of the log v$.

BYTES

----------

52428800

52428800

52428800

SQL > ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE 50 M;

ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 SIZE 50 M

*

ERROR on line 1:

ORA-02236: invalid file name

SQL > ALTER DATABASE ADD STANDBY LOGFILE SIZE 50 M;

ALTER DATABASE ADD STANDBY LOGFILE SIZE 50 M

*

ERROR on line 1:

ORA-02236: invalid file name

Hi all

I just tried to give the path and he managed...

SQL > alter database add standby logfile ' / u01/oracle/oradata/EDWIGE redo04.log "size m 50;

Database altered.

SQL > alter database add standby logfile ' / u01/oracle/oradata/EDWIGE

Database altered.

SQL > alter database add standby logfile ' / u01/oracle/oradata/EDWIGE

Database altered.

SQL > select * from v$ logfile;

GROUP # STATUS TYPE MEMBER IS_

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

/ U01/oracle/oradata/HITHA/redo No. 3 online

03 journal

/ U01/oracle/oradata/HITHA/redo No. 2 online

02.Markus newspaper

1/u01/oracle/oradata/HITHA/redo STALE in LINE No.

01.intro newspaper

4/u01/oracle/oradata/HITHA/redo of EVE No.

04.the newspaper

5/u01/oracle/oradata/HITHA/redo of EVE No.

05.Marco newspaper

6/u01/oracle/oradata/HITHA/redo of EVE No.

06.the newspaper

6 selected lines.

Tags: Database

Similar Questions

  • 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

  • ORA - 02158 invalid index option create

    I create two indexes on a table. the following two welcomes:
    CREATE INDEX C_DATA.PDD_INDEX_2 ON  "C_DATA".PDD(SYS_ID, REPORT_ID, OUTPUT_TEMPLATE_ID, SECTION_ID, DP_ID, ROW_ID) LOCAL STORE IN ( C_DATA_IND_1,C_DATA_IND_2,C_DATA_IND_4, C_DATA_IND_5,C_DATA_IND_3);
    
    
    CREATE UNIQUE INDEX C_DATA.PDATA_ID_PK ON "C_DATA".PDD(PDATA_ID) GLOBAL STORE IN ( C_DATA_IND_1,C_DATA_IND_2,C_DATA_IND_4,C_DATA_IND_3);
    1 index was created successfully, but then a returned error ORA-02158 invalid create index option.

    I only am not able to understand why I am facing this error. Kindly help.
    Database version: 11.2.0.2

    For global partitioned index, you must specify the partition type.

  • ORA-01722: invalid number when you use the function TO_CHAR.

    Hi all
    I was using this query closely for 1 year and it worked fine.

    Select to_char (' 2012/12/23 ', ' DD/MM/YYYY') twice;

    How ever from Monday onwards it's me back with the following error.

    ORA-01722: invalid number

    The NLS_DATE_FORMAT is DD-MON-RR in my version of oracle 11g.

    Please help me with this.

    They should compare these values as values of date instead of under the form of strings. TO_DATE should be used instead of TO_CHAR.

    Published by: Saran on January 2, 2012 23:00

  • ORA-01722 invalid error number

    Hi all

    I am trying to execute the query, we give the below error: ORA-01722 invalid number

    Create Table

    CREATE TABLE test_table

    (NUMBER (12.0) ID,)

    STORE_ID NUMBER (10.0).

    SUPPLIER_ID VARCHAR2 (128 BYTE),

    STATUS NUMBER (4,0).

    VARCHAR2 (2000 BYTE) COMMENTS

    )

    Insert into values table_test (81,1111, '10021', 2, null);

    Insert into values table_test (82,2222, '10021', 2, null);

    Insert into values table_test (83,1444, '10021', 2, null);

    Insert into values table_test (84,1211, '10021', 2, null);

    Insert into values table_test (85,1311, '61321', 2, null);

    commit;

    Run the query

    Select * from test_table where store_id in (: store);

    Variable binding give: store values such as 1111, 2222, 2233

    If: store variable binding is given a unique value such as 1111, it works very well.

    With multiple values his throw error ORA-01722 number not valid

    Thanks in advance

    When you assign

    : store: = '1111, 2222, 2233';

    You assingn it a SINGLE string. And store_id in ('1111, 2222, 2233') is not the same as store_id in (1111, 2222, 2233). The latter seeks store_id = 1111 or store_id = 2222 or store_id = 3333 while the former only looks store_id = '1111, 2222, 2233'. NUMBER of being store_id, Oracle tries to convert '1111, 2222, 2233' string and raises obviously ORA-01722 invalid number. Use the collection or:

    Select * from test_table where «,» | : store | ',' like '%', | store_id | ',%';

    However, keep in mind the foregoing will not use index if value is indexed.

    SY.

  • Error: ORA-01722: invalid number

    Hello

    Can some please tell me what I'm doing wrong when I try to make a difference?

    Since the format is the same I use this query

    Select b1 - b2 of TMP_1;
    Error: ORA-01722: invalid number
    --create table         
        CREATE TABLE TMP_1
    (
      B1  VARCHAR2(8 BYTE),
      B2  VARCHAR2(8 BYTE)
    ) 
    /
    
    --insert 
    
    INSERT INTO TMP_1 (B1, B2)
         VALUES ('00:02:54', '00:02:10');
    
    INSERT INTO TMP_1 (B1, B2)
         VALUES ('00:05:47', '00:03:56');
    
    INSERT INTO TMP_1 (B1, B2)
         VALUES ('00:12:49', '00:02:37');
    
    INSERT INTO TMP_1 (B1, B2)
         VALUES ('00:49:33', '00:02:09');
    
    INSERT INTO TMP_1 (B1, B2)
         VALUES ('00:06:34', '00:02:39');
    
    INSERT INTO TMP_1 (B1, B2)
         VALUES ('00:02:45', '00:01:41');
    
    INSERT INTO TMP_1 (B1, B2)
         VALUES ('00:01:22', '00:00:22');
    
    COMMIT;
    objective:

    Need to get the difference in the same format as the
     columns example: 00:02:54 

    Please provide examples of data, it is very useful. Here's one way:

    SQL> select b1, b2,
      2         b1 - (to_date(to_char(sysdate, 'dd-mon-yyyy')||' '||b2,'dd-mon-yyyy hh24:mi:ss') - trunc(sysdate)) b3
      3  from tmp_1;
    
    B1                   B2       B3
    -------------------- -------- --------------------
    03-dec-2012 20:13:33 00:02:10 03-dec-2012 20:11:23
    03-dec-2012 18:24:24 00:03:56 03-dec-2012 18:20:28
    03-dec-2012 21:48:33 00:02:37 03-dec-2012 21:45:56
    03-dec-2012 15:50:09 00:02:09 03-dec-2012 15:48:00
    03-dec-2012 14:06:24 00:02:39 03-dec-2012 14:03:45
    03-dec-2012 21:47:15 00:01:41 03-dec-2012 21:45:34
    

    John

  • An another ORA-01722: invalid number error

    Hi all
    I have 2 Validations on, 1 not Null and Not Exists, very standard.
    select fk_session_name_id
    from hrt_session
    where fk_session_name_id = :p9_fk_session_name_id
      and fk_class_id = :p9_fk_class_id;
    My question must be a Select list that returns the ID of the FK_SESSION_NAME_ID.
    select distinct SESSION_NAME display_value, PK_SESSION_NAME_ID return_value
    from HRT_SESSION_NAME
    order by 1
    My form Page up the error number ORA-01722 invalid only when I do a Select list item. If the item is a
    Value of text field and entry ID and you click on create data are saved, but not when it's a list of Select. I have read many things
    threads that talk about this point conversion to_number but I have not been successful in doing so. Once the element is
    There is a list of select validation not working, but not Validation Null fills the Error Message. Can anyone
    help me with this please? Thank you
    My FK_SESSION_NAME_ID and sessionname INTEGER data Type is VARCHAR2.
    SESSIONNAME data...
    SESSION 1
    SESSION 2
    EGR 1
    EGR 2
    BASIC WORD 2003...

    Published by: Charles on January 11, 2010 13:42

    Hello

    I changed validation FK.

    Now, it seems to work. Please check and let me know

    BR, Jari

  • ADD LOGFILE MEMBER, ORA-02236

    Hello:
    I am trying to add a log file to an existing group to help:
    ALTER DATABASE ADD LOGFILE MEMBER
    ('E:\ORACLE\ORADATA\MYDB\REDO3B.LOG') TO GROUP 3;
    It shows ORA-02236: invalid file name
    DB version: 11 GR 2
    OS: Win Server 2003

    ALTER DATABASE ADD LOGFILE MEMBER ' E:\ORACLE\ORADATA\MYDB\REDO3B. JOURNAL "IN GROUP 3;

    Concerning
    Asif Kabir

    Handle: S.Nayef
    State level: Companion (270)
    Join date: December 1, 2007
    Messages total: 554
    Total Questions: * 39 (26 pending) *.

    -Mark your useful post as correct/helpful and close all threads replied.

  • incorrect filename ora-02236

    Hello

    I was going to add a data file to a tablespace in my local win764 bit machine and I have my directory as C:\temp\myOracle11g\oradata\orcl

    The name of the data file is infa_repo_tbspc_01.dbf.

    So tried as

    CREATE TABLESPACE infa_repo PETIT_FICHIER

    DATAFILE C:/temp/myOracle11g/oradata/orcl/infa_repo_tbspc_01.dbf SIZE 50,

    DATAFILE C:/temp/myOracle11g/oradata/orcl/infa_repo_tbspc_01.dbf SIZE 50

    AUTOEXTEND OFF

    BLOCKSIZE 8192

    FORCE LOGGING

    ONLINE

    FLASHBACK

    But it gives error like incorrect filename ora-02236. Tell me where I'm wrong?...

    NickRobheart wrote:

    Hello

    I was going to add a data file to a tablespace in my local win764 bit machine and I have my directory as C:\temp\myOracle11g\oradata\orcl

    The name of the data file is infa_repo_tbspc_01.dbf.

    So tried as

    CREATE TABLESPACE infa_repo PETIT_FICHIER

    DATAFILE C:/temp/myOracle11g/oradata/orcl/infa_repo_tbspc_01.dbf SIZE 50,

    DATAFILE C:/temp/myOracle11g/oradata/orcl/infa_repo_tbspc_01.dbf SIZE 50

    AUTOEXTEND OFF

    BLOCKSIZE 8192

    FORCE LOGGING

    ONLINE

    FLASHBACK

    But it gives error like incorrect filename ora-02236. Tell me where I'm wrong?...

    You gave the key word of the DATA file twice, that's why you have this error. And you must also specify units for the size of the file. And different file names.

  • ORA-29280: invalid directory path

    do face a problem,

    My requirement is I have to brought from a schema for a remote database my current schema some procedure, packages, functions scripts and compile them here in my current schema.
    Basically, straight word what I have to do is, all functions, procedures, are there packages in the remote schema (that I can access by a datbase link) must be created in my current schema.
    so I got what I was trying to make is just source codes to access all_sources and creating files in a code here directory.giving.

    First, what I've done is created an Oracle Directory.

    First I created a directory called "PROC_PKG_FUNC" in drive D, then I ran the following command.

    SQL > create directory 'PROC_PKG_FUNC' as 'D:\'PROC_PKG_FUNC ';
    Created directory.

    CREATE or REPLACE PROCEDURE Get_Db_Ddl_Scripts as
    v_file Utl_File.FILE_TYPE;
    v_file_dir VARCHAR2 (50);
    i_first_line NUMBER: = 1;
    BEGIN

    v_file_dir: = 'PROC_PKG_FUNC ';

    FOR REC_OBJ IN
    (SELECT a DISTINCT NAME, TYPE, DECODE (TYPE, 'FUNCTION', 'FUNCTIONS', 'PACKAGE', "PACKAGES", "PACKAGE BODY ', 'PACKAGES_BODY'," PROCEDURE", 'PROCEDURES', 'TYPE', 'TYPE', 'TYPE BODY', 'TYPES_BODY') v_file_dir)
    FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE OWNER = 'FRISKDEVI41B. '
    AND TYPE IN ('FUNCTION, PROCEDURE, 'PACKAGE', 'PACKAGE BODY', 'TYPE'))
    LOOP
    v_file: = Utl_File.FOPEN (card = > REC_OBJ.v_file_dir,)
    filename = > REC_OBJ.NAME | ".sql",.
    OPEN_MODE = > 'w ',.
    max_linesize = > 32767);
    i_first_line: = 1;
    FOR REC IN (SELECT TEXT FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE NAME = REC_OBJ.NAME AND TYPE = REC_OBJ. TYPE AND OWNER = 'FRISKDEVI41B' ORDER BY LINE)
    LOOP
    IF i_first_line = 1 THEN
    Utl_File.put_line (v_file, "CREATE or REPLACE" |) REPLACE (REC. TEXT, CHR (10), NULL));
    ELSE Utl_File.PUT_LINE (v_file, REPLACE (REC. TEXT, CHR (10), NULL));
    END IF;
    i_first_line: = i_first_line + 1;
    END LOOP;
    Utl_File.FCLOSE (v_file);

    END LOOP;

    END;
    /


    but when I try to run this am getting error,
    ORA-29280: invalid directory path
    ORA-06512: at "SYS." UTL_FILE", line 33
    ORA-06512: at "SYS." UTL_FILE", line 436
    ORA-06512: at "SYS." GET_DB_DDL_SCRIPTS', line 15
    ORA-06512: at line 2

    I know probbaly get this error because I am trying to create different directories, just like functions packages etc. under the external using this loop recording repertoire, but how would it be possible, please help.

    Kind regards
    Manuella

    In oracle when you say that CREATE or REPLACE the DIRECTORY you do not create a directory in the operating system, you simply create a reference to the directory in the operating system.

    So I don't know what you're asking.

  • ORA-22907: invalid CAST to a type that is not a nested table or VARRAY. Typed collection function

    Hello

    I tried to create a function that might return the type that is created on the outside.

    So I wrote script below. until the function created it compiled successfully, but after that, when the data querying, we encountered error,

    "ORA-22907: invalid CAST to a type that is not a nested table or VARRAY.

    SQL> create table emp
      2  (
      3    ename        varchar2(200 byte),
      4    mgr          number,
      5    employee_id  number
      6  );
    
    
    Table created.
    
    
    SQL> insert into emp (ename, mgr, employee_id)
      2       values ('king', 12, 1);
    
    
    1 row created.
    
    
    SQL> insert into emp (ename, mgr, employee_id)
      2       values ('clark', 12, 2);
    
    
    1 row created.
    
    
    SQL> commit;
    
    
    Commit complete.
    
    
    SQL> create or replace type t_emp as object (ename varchar2 (200), mgr number, employee_id number);
      2  /
    
    
    Type created.
    
    
    SQL> create or replace function f_emp return  t_emp
      2   is
      3  type rc_emp is ref cursor;
      4  r_emp rc_emp;
      5  v_emp t_emp;
      6  begin
      7   open r_emp for select * from emp where rownum=1;
      8   fetch r_emp into v_emp;
      9  close r_emp;
     10  return v_emp;
     11  exception
     12      when others then
     13      dbms_output.put_line(dbms_utility.format_error_stack);
     14      dbms_output.put_line(dbms_utility.format_call_stack);
     15      dbms_output.put_line(dbms_utility.format_error_backtrace);
     16      raise_application_error(-20001,sqlerrm);
     17  end;
     18  /
    
    
    Function created.
    
    
    SQL> show errors;
    No errors.
    SQL> select * from f_emp;
    select * from f_emp
                  *
    ERROR at line 1:
    ORA-04044: procedure, function, package, or type is not allowed here
    
    
    
    
    SQL> select * from table(cast (f_emp as t_emp));
    select * from table(cast (f_emp as t_emp))
                              *
    ERROR at line 1:
    ORA-22907: invalid CAST to a type that is not a nested table or VARRAY
    
    
    
    
    SQL>
    

    Like this:

    ...

    CREATE or REPLACE TYPE t_emp_array IS TABLE OF THE t_emp;

    /

    FUNCTION to CREATE or REPLACE f_emp RETURN t_emp_array

    is

    type rc_emp is ref cursor;

    r_emp rc_emp;

    v_emp_array t_emp_array: = t_emp_array();

    BEGIN

    R_emp OPEN for SELECT t_emp(ename,mgr,employee_id) FROM emp WHERE ROWNUM = 1;

    collect the fetch r_emp in bulk in v_emp_array;

    CLOSE R_emp;

    Return v_emp_array;

    exception

    while others then

    dbms_output.put_line (dbms_utility.format_error_stack);

    dbms_output.put_line (dbms_utility.format_call_stack);

    dbms_output.put_line (dbms_utility.format_error_backtrace);

    raise_application_error (-20001, SQLERRM);

    end;

    /

    SELECT *.

    table (f_emp ());

    a table function works with a table (nested table or varray)

    HTH

  • Cannot connect through the ORA-01017 Invalid Username/Password database link

    Hello

    I have two virtual machines with Oracle 11 g 2 and one with Oracle 12 c installed on RHEL 6

    I wanted to install a dblink between the 2, but after you have created the dblink I get error: ORA - 01017 Invalid username/password

    Now, I know, the error is clear enough but when I try to connect using netmgr it works

    So just to summarize, Oracle 12 c, I'm trying to connect to Oracle 11 g using a DBLINK but I get ORA-01017

    Since Oracle 12 c, I created a new service so that I have the remote db alias in tnsname.ora and at the end of the process, when they ask for test connection, I can connect successfully to remote db

    Then I created a dblink according to the following:

    SQL > CREATE PUBLIC DBLINK LINK DATABASE to CONNECT to

    "hr""" IDENTIFIED BY ' password ' with the HELP of 'REMOTEDB ';

    If I then select * from employees@dblink, I get the error

    What I've noticed, it is that in the 11g (the target machine) I can not connect with OS authentication, don't know if its related

    If i: sqlplus / as sysdba I get ORA-01031 insufficient become

    I have to connect to the Linux box as user 'oracle', who is a member of the groups oinstall dba

    Am I missing something?

    Thank you!

    CHRI$ says:

    SQL > CREATE PUBLIC DATABASE LINK DBLINK TO CONNECT TO

    'hr' IDENTIFIED BY 'password' with the HELP of "REMOTEDB";

    You will probably have to create the link without containing the user name and the word in double quotes.

  • ORA 00904: invalid identifier "JAN".

    Hello

    I have the rest of the table.

    ===========================================

    create table ATT_ATTENDANCESHEET as

    (

    Select 1 empid, to_date('21/01/2014','dd/mm/yyyy') prdate, 240 reg, 0 unpaid all double union

    Select 2, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 200 reg, 0 unpaid all double union

    Select 3, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 240 reg, 0 unpaid all double union

    Select option 4, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 480 reg, 0 unpaid all double union

    Select 5, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 240 reg, unpaid double 0

    );

    =================================================

    I want to remove rows from table ATT_ATTENDANCESHEET.

    If the parameter passed empids, lines for employees would be eliminated.

    If empids is null, all records between the given period will be deleted.

    I created after the procedure to that effect.

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

    CREATE or replace FUNCTION deleteAttendanceDetails (startdate DATE, enddate DATE, empids varchar2) RETURN NUMBER as


    n number;

    condition varchar2 (200);

    vsql varchar2 (2000);

    BEGIN

    IF empids is not null

    THEN

    condition: condition = |' and empid in ('| empids |') ' ;

    END IF;

    vsql: =' delete from ATT_ATTENDANCESHEET where prdate between ' | StartDate | 'and' | EndDate | condition;

    EXECUTE IMMEDIATE (vsql);

    return n;

    END;

    /

    The empids parameter contains the employee IDS separated by commas.

    for example

    "1,2,3,4"

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

    But when I call this function using

    Select deleteAttendanceDetails (to_date('25/01/2014','dd/mm/yyyy'), to_date (' 01/31/2014 ',' dd/mm/yyyy'), ") double;

    I get the following error

    ORA 00904: invalid identifier "JAN".

    ORA-06512: at.. .line 21

    I use oracle 10g.

    Help, please

    Do not use dynamic sql. It's more trouble that it's worth.

    Your error comes from the fact that you convert a date to a string, implicitly and then come back.

    In addition, your example doesn't have a field of prddate... so I added that, in my test table so that it works.

    Try something like that, entirely avoid dynamic sql:

    CREATE or replace FUNCTION deleteAttendanceDetails (
                                  startdate DATE,
                                  enddate DATE,
                                  empids varchar2
                               )
       RETURN NUMBER
    as
       n number;
    BEGIN
       delete from ATT_ATTENDANCESHEET
          where ( empid IS NULL
                OR empid in ( select regexp_substr ( empids, '[^,]+', 1, level) empid
                             from dual connect by level <= (LENGTH(empids) - LENGTH(REPLACE(empids, ',')) + 1)
                          )
                )
            and prdate between nvl(startdate, to_date('01-jan-1900','dd-mon-yyyy'))
                           and nvl(enddate  , to_date('01-jan-5000','dd-mon-yyyy'));
    
      return n;  -- what is "n" ?
    END;
    /
    

    Not really sure what you want to do with "n"... you have nothing in your code... so I did the same

  • ORA-04076: invalid specification NEW or OLD

    Dear all,

    I am creating a trigger with option AFTER UPDATE but its raise the error:

    ORA-04076: invalid specification NEW or OLD

    Here's the syntax I'm using to create a trigger that sends an email, if there is no update table tab1 column NLN001. If I use not WHEN the clause then the trigger is created without any problem. But the requirement here is that the changed value of the NLN001 column trigger for the combination of the time clause ( NLKCO = "00001" NLDCT AND = 'I' AND NLCTRY = AND NLFY = 14 20) only.

    CREATE OR REPLACE TRIGGER SCHM1. UPDATE_tab1_TRG

    AFTER UPDATE

    ON SCHM1. TAB1 FOR EACH LINE

    WHERE (NLKCO = "00001" AND "EI" AND NLCTRY = 20 = NLDCT AND NLFY = 14)

    Start

    If (: NEW.) NLN001 <>: OLD. NLN001) THEN

    MAIL_FILES ('FROM_MAIL_ADD', 'TO_MAIL_ADD', 'value changed tab1', ' the value of I-TAB1 is passed to ' |: OLD.) NLN001 | « à » || : NEW. NLN001, 9999999999, null, null);

    END IF;

    End;

    /

    I hope that I have clarified my requirement. Please help me out in this matter.

    Oracle DB Version: 11.2.3.0

    Version of the OS: RHEL 5.11

    Kind regards

    Imran Khan

    Hello

    WHEN (OLD. NLKCO = "00001" AND OLD. NLDCT = "EI" AND OLD. NLCTRY = 20 AND OLD. NLFY = 14)

    This means that when the existing function of values NLKCO = "00001" oly, you must update this table right?

    So we use OLD to existing values.

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

Maybe you are looking for