V2.1 - Exporting CLOBS produces invalid SQL

When you export a table that has a CLOB via either of these methods, the SQL it produces is invalid (Quotes, Blank Lines, etc.) :
1. "Tools -> Database Export"
2. Right-click on the results page, then export as "Insert" to the clipboard
Insert into JAVASCRIPT (ID,FUNCTION_NAME,NAME,DESCRIPTION,VALID,FUNCTION,NUMBER_OF_ARGUMENTS,JAVASCRIPT,LAST_MODIFIED_DATE) values (26,'buildParameterizedUrl','Build Parameterized URL','Build Parameterized URL',1,1,3,'function buildParameterizedUrl(url, paramArray, valueArray)
url += '?';
var first = true;
for(var i in paramArray)
if(first)
first = false;
else
url += '&';
*url += paramArray[i] + '=' + valueArray;*
return url;
*',to_timestamp('16-JUL-09 09.52.30.000000000 AM','DD-MON-RR HH.MI.SS.FF AM'));*

Hi,
I encountered this problem since the EA and Vasan (one of the SQL Dev's team) gave the solution for this.
>
You can add the following in the sqldeveloper.conf to ensure that the driver doesn't report the column type of a DATE column as TIMESTAMP.
AddVMOption -Doracle.jdbc.mapDateToTimestamp=false
>
As you can see on
Re: 2.1 EA1: Problems on Date type columns
I wonder, why this isn't included on the default installation of the product, since it is absolutely wrong to use Timestamp for Date type column on the first place.
Regards,
Buntoro

Similar Messages

  • EA2 - BUG: Export produces invalid SQL for BINARY_DOUBLE columns

    Description:
    When a table contains a BINARY_DOUBLE column, INSERTs for that column in SQL exported with Export Wizard are invalid.
    Steps to reproduce:
    - open SQL Developer, connect to DB
    - make a table containing a BINARY_DOUBLE column, e.g.:
    CREATE TABLE "TESTTABLE" ("BINDBLCOL" BINARY_DOUBLE) ;
    - add some data (floating-point numbers) to the table
    - choose Tools -> Export Wizard (or Export DDL and Data in SQL Developer v1.2)
    - check exporting of tables and data, on "Specify Objects/Data" choose your table
    - press "Apply"
    Error:
    Generated SQL contains invalid INSERTs: floating-point numbers are enclosed in apostrophes (see below, relevant part is underlined).
    -- DDL for Table TESTTABLE
    CREATE TABLE "TESTTABLE"
    (     "BINDBLCOL" BINARY_DOUBLE
    -- DATA FOR TABLE TESTTABLE
    -- FILTER = none used
    -- INSERTING into TESTTABLE
    Insert into TESTTABLE (BINDBLCOL) values ('1.2345');
    -- END DATA FOR TABLE TESTTABLE
    The script, when run, produces following error on INSERT line:
    SQL Error: ORA-01722: invalid number
    When apostrophes are removed manually, script runs without problems.
    Remarks:
    SQL Developer: 1.5.0.52 MAIN-52.03; the same bug also on 1.2.1, build MAIN-32.13
    Oracle DB: 10 Express
    OS: Windows 2000 Professional
    Java: 1.5.0.52: 1.5.0_15; 1.2.1: 1.6.0_03

    Description:
    When a table contains a BINARY_DOUBLE column, INSERTs for that column in SQL exported with Export Wizard are invalid.
    Steps to reproduce:
    - open SQL Developer, connect to DB
    - make a table containing a BINARY_DOUBLE column, e.g.:
    CREATE TABLE "TESTTABLE" ("BINDBLCOL" BINARY_DOUBLE) ;
    - add some data (floating-point numbers) to the table
    - choose Tools -> Export Wizard (or Export DDL and Data in SQL Developer v1.2)
    - check exporting of tables and data, on "Specify Objects/Data" choose your table
    - press "Apply"
    Error:
    Generated SQL contains invalid INSERTs: floating-point numbers are enclosed in apostrophes (see below, relevant part is underlined).
    -- DDL for Table TESTTABLE
    CREATE TABLE "TESTTABLE"
    (     "BINDBLCOL" BINARY_DOUBLE
    -- DATA FOR TABLE TESTTABLE
    -- FILTER = none used
    -- INSERTING into TESTTABLE
    Insert into TESTTABLE (BINDBLCOL) values ('1.2345');
    -- END DATA FOR TABLE TESTTABLE
    The script, when run, produces following error on INSERT line:
    SQL Error: ORA-01722: invalid number
    When apostrophes are removed manually, script runs without problems.
    Remarks:
    SQL Developer: 1.5.0.52 MAIN-52.03; the same bug also on 1.2.1, build MAIN-32.13
    Oracle DB: 10 Express
    OS: Windows 2000 Professional
    Java: 1.5.0.52: 1.5.0_15; 1.2.1: 1.6.0_03

  • V2.1 - Exporting DATE columns produces invalid SQL

    If you export a table with a column of type DATE, the SQL produced is invalid:
    Left-click on table in tree view -> Click on "Data" tab -> Right click on data -> Export Data -> Insert -> Clipboard:
    to_timestamp('01-SEP-09 17:49:21','DD-MON-RR HH.MI.SSXFF AM')
    I have seen this work correctly, but I can't find the right combination now... but in this case the date format should be:
    to_timestamp('01-SEP-09 17:49:21','DD-MON-RR HH24.MI.SSXFF')
    Edited by: gclough on Jan 4, 2010 3:54 PM

    Hi,
    I encountered this problem since the EA and Vasan (one of the SQL Dev's team) gave the solution for this.
    >
    You can add the following in the sqldeveloper.conf to ensure that the driver doesn't report the column type of a DATE column as TIMESTAMP.
    AddVMOption -Doracle.jdbc.mapDateToTimestamp=false
    >
    As you can see on
    Re: 2.1 EA1: Problems on Date type columns
    I wonder, why this isn't included on the default installation of the product, since it is absolutely wrong to use Timestamp for Date type column on the first place.
    Regards,
    Buntoro

  • Trying to produce report but have ERROR ORA-00900: invalid SQL statement

    Hi,
    I am new to Oracle so have been experimenting with a few things to get the hang of it. I have been trying to produce a report, but keep getting the error: ORA-00900: invalid SQL statement.
    This happens at my first line of code where I have COLUMN <column_name> HEADING <Heading_name>
    So I am a bit confused - is there a command that I am supposed to issue that indicates to SQL*Plus that I am trying to create a report?
    Also, if I just delete the COLUMN <column_name> HEADING <Heading_name> rows and just start at BREAK ON <column_name> SKIP 1, it produces the same error.
    I am using Oracle 8.0.6 - does this make a difference?
    Here is my code:
    COLUMN a.p_ctryid HEADING 'Country'
    COLUMN s.p_animid HEADING 'Stallion ID'
    COLUMN s.p_uname HEADING 'Stallion Name'
    COLUMN a.p_animid HEADING 'Horse ID'
    COLUMN d.p_careertp HEADING 'Career'
    BREAK ON s.p_animid SKIP 1
    BREAK ON d.p_careertp SKIP 2
    COMPUTE SUM LABEL 'Total' OF d.p_careertp ON REPORT
    SELECT DISTINCT a.p_ctryid, s.p_animid, s.p_uname, a.p_animid, d.p_careertp
    FROM p_owby.p_animal a, p_owby.p_animal s, p_owby.p_mating m, p_owby.p_anim_dtl d
    WHERE m.p_mateyr = 2001
    AND a.p_animid = d.p_animid
    AND a.p_animid = m.p_animid
    AND a.p_animid > 0
    AND s.p_animid = a.p_sire
    AND a.p_ctryid IN('GB','IRE')
    GROUP BY a.p_ctryid, s.p_animid, s.p_uname, d.p_careertp, a.p_animid
    ORDER BY a.p_ctryid, s.p_animid, d.p_careertp
    Any help would be greatly appreciated!
    Thanks in advance!

    You are trying to do COMPUTE SUM ... ON REPORT but there is no BREAK ON REPORT specified. The computed sum will not be shown unless you also break on report. see below demonstration. first select has no sum even though we have specified COMPUTE. The second select shows the sum since now we have done break on report.
    SQL> compute sum of sal on report
    SQL> select * from scott.emp order by empno ;
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-1981       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-1981       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-1981       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-1981       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-1981       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-1981       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-1987       3000                    20
          7839 KING       PRESIDENT            17-NOV-1981       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-1981       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-1987       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-1981        950                    30
          7902 FORD       ANALYST         7566 03-DEC-1981       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-1982       1300                    10
    14 rows selected.
    SQL> break on report
    SQL> select * from scott.emp order by empno ;
         EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-1980        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-1981       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-1981       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-1981       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-1981       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-1981       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-1981       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-1987       3000                    20
          7839 KING       PRESIDENT            17-NOV-1981       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-1981       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-1987       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-1981        950                    30
          7902 FORD       ANALYST         7566 03-DEC-1981       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-1982       1300                    10
    sum                                                         29025
    14 rows selected.
    SQL>

  • Invalid SQL Query with DBMS_JOB.SUBMIT inside

    Probably a simple thing, but I can't seem to find the problem in here. I get an error that INVALID SQL STATEMENT. I guess I'm messing something up with the lots of ' chars. If anyone could point out where did I failed I'd be really grateful.
    create or replace
    trigger TR_REFRESH_SCHEMAS
      after create or alter
      on schema
    declare
      tableName         user_tables.table_name%TYPE;
      table_count       number(2);
    begin
      select ora_dict_obj_name
      into tableName
      from dual;
      select  count(table_name)
      into    table_count
      from    user_tables
      where   table_name = tableName;
      if (table_count != 0) then
        execute immediate
          'BEGIN'                     ||
            'DBMS_JOB.SUBMIT'         ||
            '('                       ||
              'job        => '        || table_count      || ','        ||
              'what       => '        || 'INSERT_SCHEMA(' ||  tableName || ');,' ||
              'next_date  => '        || sysdate          || ','        ||
              'interval   => '        || null             ||
            ');'                      ||
          'END;'                      ||
          'COMMIT;'
      end if;
      exception
        when no_data_found then
          raise_application_error(-20020, 'Table ' || tableName || ' not found!');
        when others then
          raise_application_error(-20002, 'Error (' || SQLCODE || '): ' || SQLERRM);
    end;

    I've tried all your recommendations without any success.
    For the dbms_output.put_line:
    - I've found there was a problem with the interval => null. In the final statement it looked like: DBMS_JOB.SUBMIT(1, INSERT_SCHEMA(TEST), 2012-08-31...., ); obviously wrong. Since the default value of interval is NULL I've taken out that parameter.
    For the formatting:
    - Thanks for pointing that out! It was surely a problem with that part, as I've seen when printing the statement.
    execute immediate
          'BEGIN '                    ||
            'DBMS_JOB.SUBMIT'         ||
            '('                       ||
              'job        => '        || table_count        || ','        ||
              'what       => '        || 'INSERT_SCHEMA(''' ||  tableName || ''');,' ||
              'next_date  => '        || sysdate            ||
            ');'                      ||
          'END;'
        );With the qnotation:
    - I get an immediate syntactical error when inserting your code right at the second 'q{' part. On the other hand the first parameter: job is a number type so to_char is meaningless in my opinion.
    The result so far for a CREATE TABLE statement:
    Error starting at line 1 in command:
    create table TESTING
      id varchar2(20) not null,
      text number(8),
      dat blob,
      creat_e date
    Error at Command Line:1 Column:0
    Error report:
    SQL Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-20002: Error (-6550): ORA-06550: line 1, column 77:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:
       . ( ) , * % & = - + < / > at in is mod remainder not rem
       <an exponent (**)> <> or != or ~= >= <= <> and or like like2
       like4 likec between || multiset member submultiset
    The symbol ";" was ignored.
    ORA-06550: line 1, column 102:
    PLS-00103: Encountered the symbol "-" when expecting one of the following:
       <an identifier> <a double-quoted delimited-identifier>
       current delete exists prior
    Th
    ORA-06512: at line 32
    00604. 00000 -  "error occurred at recursive SQL level %s"
    *Cause:    An error occurred while processing a recursive SQL statement
               (a statement applying to internal dictionary tables).
    *Action:   If the situation described in the next error on the stack
               can be corrected, do so; otherwise contact Oracle Support.

  • Can we use Data Pump to export data, using a SQL query, doing a join

    Folks,
    I have a quick question.
    Using Oracle 10g R2 on Solaris 10.
    Can Data Pump be used to export data, using a SQL query which is doing a join between 3 tables ?
    Thanks,
    Ashish

    Hello,
    No , this is from expdp help=Y
    QUERY                 Predicate clause used to export a subset of a table.
    Regards

  • ORA-00900: invalid SQL statement error while running jobs in APEX 4.2

    Hi,
    the following procedure compiled successfully in Apex 4.2:
    create or replace procedure "DEVLOE" AS
    L_TEMPLATE VARCHAR2(32000);
    L_base_TEMPLATE VARCHAR2(32000);
    begin
    l_base_template := '<html>
    <head>
    <title>HTML Editor Sample Page</title>
    </head>
    <body>
    <p>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span class="plsql-literal" style="line-height: 14.65625px; white-space: nowrap;">Hi #Contact#,</span></span></span></p>
    <p>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span class="plsql-literal" style="line-height: 14.65625px; white-space: nowrap;">This is a notification message to inform you that <strong>Development </strong>effort </span><span class="plsql-literal" style="line-height: 14.65625px; white-space: nowrap;">and milestones are yet to be updated for ECR: </span><span class="plsql-operator" style="line-height: 14.65625px; white-space: nowrap;"></span><span class="plsql-word" style="line-height: 14.65625px; white-space: nowrap;">#ECR_NAME#. This ECR has priority #p#. </span></span></span></p>
    <table align="center" border="1" cellpadding="1" cellspacing="1" style="width: 500px;">
    <tbody>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="color: rgb(255, 0, 0);"><span style="font-family: verdana, geneva, sans-serif;"><u><strong>Department</strong></u></span></span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(255, 0, 0);"><u><strong><span style="background-color: rgb(255, 255, 255);">Contact Name</span></strong></u></span></span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Product Management Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#pdm#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">PMO Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#PMO#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Dev Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#Dev#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">QA Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#QA#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Infodev Contact</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#Info#</span></span></td>
    </tr>
    </tbody>
    </table>
    <p>
     </p>
    <span fckbookmark="1" style="display: none;"> </span><span fckbookmark="1" style="display: none;"> </span>
    <table align="center" border="1" cellpadding="1" cellspacing="1" style="width: 500px;">
    <tbody>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(0, 0, 255);">Team</span></span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(0, 0, 255);">Start Date</span></span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(0, 0, 255);">End Date</span></span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;"><span style="color: rgb(0, 0, 255);">Effort(in person days)</span></span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Development</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#d1#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#e1#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#L1#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Quality Assurance</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#d2#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#e2#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#L2#</span></span></td>
    </tr>
    <tr>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">Information Development</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#d3#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#e3#</span></span></td>
    <td>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">#L3#</span></span></td>
    </tr>
    </tbody>
    </table>
    <p>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">The ECR application is located</span> at </span>: https://apex.oraclecorp.com/pls/apex/f?p=1472:1<span fckbookmark="1" style="display: none;"> </span></p>
    <span fckbookmark="1" style="display: none;"> </span>
    <p>
    <span style="font-family: verdana, geneva, sans-serif; font-size: 14px;">Regards,</span></p>
    <p>
     </p>
    <p>
    <span style="font-size:14px;"><span style="font-family: verdana, geneva, sans-serif;">ECR Team</span></span></p>
    </body>
    </html>
    FOR c1 IN (select ECR_NAME,PMO_CONTACT, QE_LOE,INFODEV_LOE, DEV_START_DATE, DEV_END_DATE, QE_CONTACT,QE_START_DATE,INFODEV_START_DATE,INFODEV_END_DATE, QE_END_DATE, INFODEV_CONTACT, PDM_CONTACT, DEV_LOE,ECR_PRIORITY, DEV_CONTACT from ECR_NAME WHERE DEV_LOE IS NULL AND ECR_STATUS = 'Effort Estimation is in Progress' AND ECR_PRIORITY <=5)
    LOOP
    l_template := l_base_template;
    l_template:= replace(l_template, '#Contact#', c1.DEV_CONTACT);
    l_template:= replace(l_template, '#ECR_NAME#', c1.ECR_NAME);
    l_template:= replace(l_template, '#p#', c1.ECR_PRIORITY);
    l_template:= replace(l_template, '#PMO#', c1.PMO_CONTACT);
    l_template:= replace(l_template, '#pdm#', c1.PDM_CONTACT);
    l_template:= replace(l_template, '#Dev#', c1.DEV_CONTACT);
    l_template:= replace(l_template, '#QA#', c1.QE_CONTACT);
    l_template:= replace(l_template, '#Info#', c1.INFODEV_CONTACT);
    l_template:= replace(l_template, '#d1#', c1.DEV_START_DATE);
    l_template:= replace(l_template, '#L1#', c1.DEV_LOE);
    l_template:= replace(l_template, '#e1#', c1.DEV_END_DATE);
    l_template:= replace(l_template, '#d2#', c1.QE_START_DATE);
    l_template:= replace(l_template, '#L2#', c1.QE_LOE);
    l_template:= replace(l_template, '#e2#', c1.QE_END_DATE);
    l_template:= replace(l_template, '#d3#', c1.INFODEV_START_DATE);
    l_template:= replace(l_template, '#L3#', c1.INFODEV_LOE);
    l_template:= replace(l_template, '#e3#', c1.INFODEV_END_DATE);
    htmldb_mail.Send(p_to => '[email protected]',
    p_cc => '[email protected]',
    p_from => '[email protected]',
    p_body => l_template,
    p_body_html => l_template,
    p_subj => 'cxxxx:' ||c1.ECR_NAME );
    END LOOP;
    end;
    the when I ran:
    begin
    devloe();
    end;
    I received the mail as well.
    However, when I try to schedule this in the job:
    declare
    JobNo user_jobs.job%TYPE;
    begin
    dbms_job.submit(JobNo, 'BEGIN
    DEVLOE();
    END;', sysdate, 'sysdate + 1/24/60'); commit; end;
    The job status shows failures every minute.
    dbms_job.run(job_no);
    It gave : ORA-00900: invalid SQL statement

    First of all I don't see a procedure header.
    Secondly I see you commit inside your procedure. This is a bug.
    Thirdly I see you also commit inside a loop. This is also a bug, and needs to be removed asap.
    The error indicates a statement doesn't parse. As you don't post the error stack, nor a table definition no one can reproduce the problem.
    You need to isolate the statements, one by one, and run them through sql*plus to see what happens.
    Sybrand Bakker
    Senior Oracle DBA

  • Reg: Error in Data Template ( java.sql.SQLException: ORA-00900: invalid SQL

    Hi Experts,
    Good Morning..
    I registered the data template which i created in oracle apps and while i run that, ended in error... Plz help me..
    Step :-1 Used Data Template as below:-
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <dataTemplate name="EMP" defaultPackage="" description="Employee Data">
    - <properties>
    <property name="include_parameters" value="true" />
    <property name="include_null_Element" value="true" />
    <property name="xml_tag_case" value="upper" />
    <property name="db_fetch_size" value="500" />
    <property name="scalable_mode" value="off" />
    <property name="include_rowsettag" value="false" />
    <property name="debug_mode" value="off" />
    </properties>
    <parameters/>
    <parameters name="pdeptno" dataType="number" defaultValue=" ">
    </parameters>
    <lexicals />
    - <dataQuery>
    - <sqlStatement name="DEPT" dataSourceRef="">
    - <![CDATA[
              SELECT DEPTNO,DNAME,
              LOC,CURSOR(SELECT  EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,nvl(COMM,0) COMM from EMP ) as EMP
              from dept
              where deptno=pdeptno
              order by deptno]]>
    </sqlStatement>
    </dataQuery>
    </dataTemplate>
    Step -2:-
    Registered in xml publisher administrator
    Step -3:-
    While i am running this getting below error-
    XDO Data Engine Version No: 5.6.3
    Resp: 20419
    Org ID : 204
    Request ID: 5380496
    All Parameters: pdeptno=10
    Data Template Code: EMP_DD
    Data Template Application Short Name: FND
    Debug Flag: N
    {pdeptno=10}
    Calling XDO Data Engine...
    java.sql.SQLException: ORA-00900: invalid SQL statement
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:392)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:286)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Start of log messages from FND_FILE
    Any mistake i made.. Issue may be silly..plz help me...
    Thanks in advance..
    Happy

    Hi all,,,,
    Thank so much for your valuable response regarding this issue..
    Actually my scenario meet this below example, path for that example:-.
    http://blogs.oracle.com/xmlpublisher/2007/02/data_templates_without_groupin.html
    I am simply executing that data template. but getting this error :-
    XDO Data Engine Version No: 5.6.3
    Resp: 20419
    Org ID : 204
    Request ID: 5380496
    All Parameters: pdeptno=10
    Data Template Code: EMP_DD
    Data Template Application Short Name: FND
    Debug Flag: N
    {pdeptno=10}
    Calling XDO Data Engine...
    java.sql.SQLException: ORA-00900: invalid SQL statement
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeDefaultGroup(XMLPGEN.java:392)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:286)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:273)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:215)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:254)
         at oracle.apps.xdo.dataengine.DataProcessor.processDataStructre(DataProcessor.java:390)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:355)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:348)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:293)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:157)
    Start of log messages from FND_FILE

  • I am getting "ORA-00900: invalid SQL statement"  error.?

    I did installed oracle 11gR2. and used "DBMS_METADATA_DIFF.COMPARE_ALTER('TABLE','TBL_A','TBL_A','USER1','USER2')"   to see the result like below,  but I am getting "ORA-00900: invalid SQL statement"  error.   Any idea?
    I am using:
    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
    SQL> desc user1.tbl_a
    Name                                      Null?    Type
    FIELD_A1                                  NOT NULL NUMBER
    FIELD_A2                                           VARCHAR2(20)
    FIELD_A4                                  NOT NULL NUMBER(5,2)
    FIELD_A5                                           VARCHAR2(10)
    FIELD_A6                                  NOT NULL NUMBER(2)
    SQL> desc user2.tbl_a
    Name                                      Null?    Type
    FIELD_A1                                  NOT NULL NUMBER
    FIELD_A2                                           VARCHAR2(50)
    FIELD_A3                                           DATE
    FIELD_A4                                           NUMBER(5,2)
    FIELD_A5                                  NOT NULL VARCHAR2(10)
    SQL> select dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','USER1','USER2') from dual
    expected result:
    DBMS_METADATA_DIFF.COMPARE_ALTER('TABLE','TBL_A','TBL_A','U1','U2')
    ALTER TABLE "U1"."TBL_A" ADD ("FIELD_A3" DATE)
      ALTER TABLE "U1"."TBL_A" DROP ("FIELD_A6")
      ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A2" VARCHAR2(50))
      ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A4" NUMBER(5,2) DEFAULT 0)
      ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A4" NULL)
      ALTER TABLE "U1"."TBL_A" MODIFY ("FIELD_A5" NOT NULL ENABLE)

    Thanks for reply rp,
    I got result using "select dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','USER1','USER2') from dual"

  • ORA-00900: invalid SQL statement Error while Executing Procedure

    Hi:
    I am trying to execute following procedure through java code, but i am getting ORA-00900: invalid SQL statement error.
    Procedure is :
    <code>
    (vResult out int)
    as
    vCardId varchar2(16);
    vForacid varchar2(16);
    vApp_Entry_No varchar2(10);
    vSrNo number(6);
    vCardStatus char(1);
    vCardStat char(2);
    vExpiryDate date;
    Cursor cardCur1 is
    select u.card_number,trim(u.ACCOUNT_NUMBER),u.CARD_STATUS,to_char(u.EXPIRY_DATE,'dd-MM-yyyy')
    FROM DailyCardData u
    where default_indicator='1'
    and isprocessed = 'N'
    order by expiry_date;
    begin
    vSrNo := 0;
    vResult := 0;
    open cardCur1;
    Loop
    fetch cardCur1 into vCardId,vForacid,vCardStat,vExpiryDate;
    if cardCur1%NOTFOUND then
    exit;
    end if;
    if (vCardStat != null) then
    vCardStatus := 'H';
    elsif (vExpiryDate <= sysdate) then
    vCardStatus := 'E';
    else
    vCardStatus := null;
    end if;
    select a.app_entry_no into vApp_Entry_No from Application a,ApplicationLinkedAccounts l
    where l.foracid = vForacid and l.AcSrNo = '1'
    and a.app_entry_no = l.app_entry_no
    and a.cardid is null
    and a.DOWNLOADFILECREATIONFLAG = 'Y';
    update Application set CardId = vCardId,
    Card_Status = vCardStatus,APPLICATIONPROCESSEDFLAG = 'Y',
    APPLICATIONPROCESSEDdate = DOWNLOADFILECREATIONdate
    where App_Entry_No = vApp_Entry_No;
    commit;
    update DailyCardData set isprocessed = 'Y',app_entry_no = vApp_Entry_No
    where card_number = vCardId;
    commit;
    end Loop;
    close cardCur1;
    vResult := 1;
    end;
    </code>
    Can any body help me in that?
    Thank You,
    Anup

    First of all I don't see a procedure header.
    Secondly I see you commit inside your procedure. This is a bug.
    Thirdly I see you also commit inside a loop. This is also a bug, and needs to be removed asap.
    The error indicates a statement doesn't parse. As you don't post the error stack, nor a table definition no one can reproduce the problem.
    You need to isolate the statements, one by one, and run them through sql*plus to see what happens.
    Sybrand Bakker
    Senior Oracle DBA

  • RTFProcessor produces invalid XSL-FO in WebLogic

    I've been writing an application that uses the RTProcessor class to process an rtf file into XML, which I can then parse to information about the report layout.
    While developing on tomcat this worked fine. However for production we will be deploying on WebLogic. WebLogic seems to be using a different XML parser that is stricter than tomcats so when using the application the XML parser throws an error when parsing the XSL-FO.
    The problem is that XSL-FO is not valid XML as it contains an invalid character on the line:
    <xsl:variable name="_XDOXSLTCTX" select="xdoxslt:set_xslt_locale($_XDOCTX, $_XDOLOCALE, $_XDOTIMEZONE, $_XDOCALENDAR, concat($_XDODFOVERRIDE,'',$_XDOCURMASKS,'',$_XDONFSEPARATORS))"/>
    So my first question is: Is there a way to stop this element from being generated in the XSL-FO? This seems to have been looked at in this thread but without much of a conclusion:
    BI Publisher produces invalid XSL:FO stylesheet
    My second question: I don't understand how Tomcat can parse the XML and WebLogic can't. I'm deploying the same code so I'd assumed it would be using the same parser. As a work around around is it possible to configure WebLogic to use the same parser as tomcat? The relevant code I'm using is posted below:
    ByteArrayOutputStream templateOutputStream = new ByteArrayOutputStream();
                   RTFProcessor rtfProcessor = new RTFProcessor(
                             new FileInputStream(template.getTemplateFile())
                   rtfProcessor.setOutput(templateOutputStream);
                   rtfProcessor.process();
                   logger.debug(this.className + " - " + methodName +
                             ":#2 XSL-FO : " + templateOutputStream.toString());
                   DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                   DocumentBuilder db = dbf.newDocumentBuilder();
                   // parse using builder to get DOM representation of the XML file
                   Document dom = db.parse(new ByteArrayInputStream(templateOutputStream.toByteArray()));
    Thanks in advance.

    Hi,
    Thanks for your reply, After debugging the application carefully in Tomcat and Weblogic it became apparent that weblogic was using it's preferred XML parsers when parsing my XML.
    In Tomcat has a different order or precedence for its class loader so it was parsing my XML with the oracle.xml package, Weblogic was instead using its own weblogic.xml parser. So I had to set up a weblogic-application.xml file to control this.
    If you're right that the XML is valid, then this looks like there is a bug in the weblogic parser. I'm not at work at the moment but if you want more details I can get you them next week.
    Thanks.

  • Apex_collection.create_collection_from_query and ORA-00900 Invalid SQL

    I am very new to collections and I am having an issue creating my first collection.  When I execute the following code I get ORA-00900  invalid sql.
    apex_collection.create_collection_from_query ('TEST', 'select * from apex_collections', 'NO');
    Any guidance is greatly appreciated.  I am running Oracle 11g and APEX 4.1.0.00.32.

    Sorry bad example.  I have tried several tables.  One only had a few columns and just text and numbers.  This is the table I am trying to load into the collection.  It does not seem to matter what I put in as the sql, it always comes back invalid sql.
    My table looks like this.
    Name                 Null     Type         
    MATERIAL_ID                               NOT NULL NUMBER       
    MATERIAL_NAME                         NOT NULL VARCHAR2(75) 
    MATERIAL_DESCRIPTION                             VARCHAR2(500)
    CATEGORY_ID                             NOT NULL NUMBER       
    SUBCATEGORY_ID                                       NUMBER       
    QTY                                             NOT NULL NUMBER(2)    
    REQUESTED_QTY                                        NUMBER(2)    
    I have to be doing something really simple wrong.

  • Executing Stored Procedure from TOAD: ORA-00900: invalid SQL statement

    Ok…I have ALL the stored procedures converted into Oracle…now, when I go to test them I am getting the vague error of:
    ORA-00900: invalid SQL statement
    I am attempting to execute:
    --EXEC IEXGetAgentSysPerf(to_date('2008/09/01', 'yyyy/mm/dd/'), to_date('2008/09/11', 'yyyy/mm/dd'), 'US HelpDesk');
    EXEC IEXGetAgentSysPerf('9/1/2008', '9/11/2008', 'US HelpDesk');
    (Neither work). These are calling a Stored Procedure with the following header:
         PROCEDURE IEXGetAgentSysPerf (
              v_curparm_IEXGetAgentSysPerf     IN OUT      pkg_IEX.cur_IEXGetAgentSysPerf
              ,v_BDateTime     DATE
              ,v_EDateTime     DATE
              ,v_WorkGroup     VARCHAR2
    The IDE is “TOAD” for Oracle. Thanks in advance.

    Hi,
    This is your procedure
    PROCEDURE IEXGetAgentSysPerf (
    v_curparm_IEXGetAgentSysPerf IN OUT pkg_IEX.cur_IEXGetAgentSysPerf
    ,v_BDateTime DATE
    ,v_EDateTime DATE
    ,v_WorkGroup VARCHAR2
    you are providing the ,v_BDateTime DATE,v_EDateTime DATE and v_WorkGroup
    and how about "v_curparm_IEXGetAgentSysPerf ". So that procedures is returning the error.
    Adding the the earlier post, If you want to test the Stored Procedures... then I say you work on the PL/SQL
    Developer which good for debugging (easy to use...) When compare to TOAD.. :-)
    Test ..it there...
    - Pavan Kumar N

  • What may be the cause of this error java.sql.SQLException: invalid sql type passed to callable statement in iplanet ussing JNDI

     

    Hi,
    The possibilities can be of various reasons, with the sql statements,
    xml descriptors, data sources, improper drivers anything. To crack down
    the solution, kindly let me know the error messages and what exactly are
    you trying to accomplish.
    Thanks & Regards
    Raj
    manimaran t wrote:
    what may be the cause of this error java.sql.SQLException: invalid sql
    type passed to callable statement in iplanet ussing JNDI
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Query cannot be parsed within the Builder ORA-00900: invalid SQL statement

    Why am I getting the error message "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00900: invalid SQL statement"
    If I run the query in sqlplus it comes back with "no rows selected" which is what I want.
    The function is valid and the user has privileges to run it.
    Is there something I can do about it?
    If I only have any field instead of the function the error goes away.
    Can someone explain what is happening? I'm using 2.0.
    select
    F_TOTAL_AMOUNT_PAID('fees',a.acct_fee_id,0) "Fee Paid"
    from fee_component a, fee b, license c
    where a.acctfee_id = b.acctfee_id
    and b.license_id = c.license_id
    and b.fee_status = 'U'
    and c.client_id = :P301_CLIENT_ID
    Thanks I really appreciate any help I can get.

    Does your parsing schema have direct granted privileges to execute the function or privileges via a role? If it is through a role, you need to directly grant execute on the function to your parsing schema.
    Mike

Maybe you are looking for

  • Idvd slideshow

    I guess I did not post enough info on my first post so I am trying again. Can you tell I am a newbee at this site. I have made a few slideshows on the I life idvd 05. The last 2 have had problems playing on the dvd player,but not on my computer. I ma

  • JNI generated header file does not match the class file

    We have had a JNI project for many years and all has been fine. Within our libraries we have several classes that have inner enum classes. Recently we have moved to JDK1.7. Up to now when JNI generated the methods where the signature used the inner e

  • How do I convert VIDEO_TS data into a playable Video?

      I am very new to video but have a short-ish fused problem and am looking up a hill.   Very recently I obtained 11 DVDs from YESVIDEO via Walmart.  A relative had taken my mother's many 8 and super 8 film strips and gotten the film converted into di

  • BI Analytics - ORA-12637: Packet receive failed at OCI call OCIServerAttach

    Hi All, I'm running through 1 of the tutorials at the moment, and when I try to view results in an Analytics dashboard, I get the following error message: - View Display Error Odbc driver returned an error (SQLExecDirectW). Error Details Error Codes:

  • Stock transfer between stor locations - copy in reference data

    Dear all, We would like to implement a process in SAP MM that is as follows. However so far we have not been able to find a suitable/good solution for the below step number 5 below Proces in general: A number of Materials are to be received in storag