Error in SQL Code

Hi,
My below code works fine if i execute it...
SELECT
A.cno ,
     B.inceptiondate
     FROM
A
LEFT OUTER JOIN
select TRIM(cno) cno,
     max(inceptiondate) inception_date
     FROM [email protected]
group by cno)B
ON
A.cno=B.cno
AND
A.inceptiondate=B.inceptiondate
But the problem comes if i try to create one more table on it
SELECT * FROM
( SELECT
A.cno ,
     B.inceptiondate
     FROM
A
LEFT OUTER JOIN
select TRIM(cno) cno,
     max(inceptiondate) inception_date
     FROM [email protected]
group by cno)B
ON
A.cno=B.cno
AND
A.inceptiondate=B.inceptiondate ) TEMP1
It fails with 00904 and 02063 errors.
Can some one help me in this...

why don't you create table directly
create table table1 as select * from......
try this...
I guess the problem u r facing could be datatype error
or
The column name entered is either missing or invalid.
Please post the exact error code and message

Similar Messages

  • Getting error while compiling this pl/sql code

    Hi,
    I am trying to execute the below block of pl/sql code and i encountering an error. i tried all possible combination of paranthesis and quotes. still giving error. can someone please help?
    IF inserting THEN
    pk_imdb_audit.p_ins_characteristic_a_t
    (in_'||rpad(column_name,35,' ')||'=> pk_imdb_audit.v_action_inserting,'
    WHEN max_col = column_id THEN
    in_'||rpad(column_name,35,' ')||'=> '||lower(in_col_value)||');'
    ELSE
    ' in_'||rpad(column_name,35,' ')||'=> '||lower(in_col_value)||','
    END text,
    table_name,
    column_id,
    2 disp_ord
    error snapshot:-
    ORA-06550: line 14, column 14:
    PLS-00103: Encountered the symbol "||rpad(column_name,35," when expecting one of the following:
    . ( ) , * @ % & | = - + < / > at in is mod remainder not
    range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
    and or like LIKE2_ LIKE4_ LIKEC_ as between from using ||
    multiset member SUBMULTISET_
    The symbol "( was inserted before "||rpad(column_name,35," to continue.
    ORA-06550: line 15, column 13:
    PLS-00103: Encountered the symbol "WHEN" when expecting one of th

    Hi,
    here is a 'parseable' version of your query, but there is numerous ways to improve what you want to do (not sure even if the query is giving you what you're expecting from it):
    SELECT text
    FROM   (SELECT (CASE
                       WHEN min_col = max_col THEN    'CREATE OR REPLACE TRIGGER '
                                                   || SUBSTR(column_name,
                                                             1,
                                                             4
                                                   || 'aud
    AFTER INSERT
    OR UPDATE
    OF '
                                                   || column_name
                                                   || ',
    OR DELETE ON imdb.'
                                                   || table_name
                                                   || '
    FOR EACH ROW'
                       ELSE(CASE
                               WHEN min_col = column_id THEN    'CREATE OR REPLACE TRIGGER '
                                                             || SUBSTR(column_name,
                                                                       1,
                                                                       4
                                                             || 'aud
    AFTER INSERT
    OR UPDATE
    OF '
                                                             || column_name
                                                             || ','
                               ELSE(CASE
                                       WHEN max_col = column_id THEN    ' '
                                                                     || column_name
                                                                     || '
    OR DELETE ON imdb.'
                                                                     || table_name
                                                                     || '
    FOR EACH ROW'
                                       ELSE(CASE
                                               WHEN column_id IS NULL THEN    'CREATE OR REPLACE TRIGGER '
                                                                           || SUBSTR
                                                                                 (column_name,
                                                                                  1,
                                                                                  4
                                                                           || 'aud
    AFTER INSERT
    OR UPDATE
    OR DELETE ON imdb.'
                                                                           || table_name
                                               ELSE    ' '
                                                    || column_name
                                                    || ','
                                            END
                                    END
                            END
                    END
                   ) text,
                   table_name1 table_name,
                   column_id,
                   1 disp_ord
            FROM   (SELECT LOWER(REPLACE(column_name,
                                         'O_',
                                        )) column_name,                   /*changing O to O_*/
                           LOWER(REPLACE(t.table_name,
                                         '_A_',
                                        )) table_name,
                           LOWER(t.table_name) table_name1,
                           c.column_id,
                           MIN(column_id) OVER(PARTITION BY c.table_name) min_col,
                           MAX(column_id) OVER(PARTITION BY c.table_name) max_col
                    FROM   all_tab_columns c,
                           (SELECT object_name table_name
                            FROM   all_objects
                            WHERE  TRUNC(created) = TRUNC(SYSDATE)
                            AND    object_name = 'CHARACTERISTIC_A_T') t
    --AND object_name LIKE 'IMDB/_A/_%' ESCAPE '/') t /*commented this line for testing*/
                    WHERE  c.table_name(+) = t.table_name
                    AND    SUBSTR(column_name(+),
                                  1,
                                  2
                                 ) = 'O_'))
              /*changed the substring condition to match new changes*/
    UNION ALL
    SELECT (CASE
               WHEN min_col = column_id THEN    'DECLARE
    BEGIN
    IF inserting THEN
    pk_imdb_audit.p_ins_characteristic_a_t
    (in_'
                                             || RPAD(column_name,
                                                     35,
                                             || '=> pk_imdb_audit.v_action_inserting,'
               ELSE(CASE
                       WHEN max_col = column_id THEN    'in_'
                                                     || RPAD(column_name,
                                                             35,
                                                     || '=> '
                                                     || LOWER(in_col_value)
                                                     || ');'
                       ELSE    ' in_'
                            || RPAD(column_name,
                                    35,
                            || '=> '
                            || LOWER(in_col_value)
                            || ','
                    END
            END
           ) text /*,
           table_name,
           column_id,
           2 disp_ord*/
    FROM   (SELECT table_name,
                   column_name,
                   column_id,
                   min_col,
                   max_col,
                   in_col_value,
                   trg_header,
                      'in_'
                   || RPAD(column_name,
                           35,
                   || '=> '
                   || LOWER(in_col_value)
                   || ',' in_col
            FROM   (SELECT   LOWER(c.column_name) column_name,
                             LOWER(c.table_name) table_name,
                             c.column_id,
                             (CASE
                                 WHEN SUBSTR(column_name,
                                             1,
                                             2
                                            ) = 'N_' THEN
                                   /*changed the substring condition to match the new change*/
                                                            ':NEW.'
                                                         || REPLACE
                                                               (column_name,
                                                                'N_',
                                                                'N_'
                                            /*changed the condition to match new requirement*/
                                 WHEN SUBSTR(column_name,
                                             1,
                                             2
                                            ) = 'O_' THEN
                                   /*changed the substring condition to match the new change*/
                                                         'NULL'
                                 ELSE    ':NEW.'
                                      || REPLACE(column_name,
                                                 '_A_',
                              END
                             ) in_col_value,
                             LOWER(SUBSTR(column_name,
                                          1,
                                          3
                                         )) trg_header,
                             MIN(column_id) OVER(PARTITION BY c.table_name) min_col,
                             MAX(column_id) OVER(PARTITION BY c.table_name) max_col
                    FROM     all_tab_columns c
                    WHERE    c.table_name IN(
                                SELECT object_name
                                FROM   all_objects
                                WHERE  TRUNC(created) = TRUNC(SYSDATE)
                                AND    object_name = 'CHARACTERISTIC_A_T')
                    ORDER BY c.table_name,
                             c.column_id))

  • Am facing this error sqlcode :-6502 while running sql code in plsql block

    Am facing this error sqlcode :-6502 while running sql code in plsql block.
    am using query :
    SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) FROM DUAL;
    CAN any body tell me why.

    BD_Fayez wrote:
    I've tried the following, but don't get any error.As I mentioned, most likely variable is too short:
    SQL> declare
      2  strSub varchar2(2);
      3  begin
      4  SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) into strSub FROM DUAL;
      5  dbms_output.put_line(strSub);
      6  end;
      7  /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 4
    SQL> SY.

  • ODBC error state: 60 code: 102 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near

    Hi,
    I am currently receiving the following error in BI Answers when I run a query against a Microsoft SQL 2005 Server.
    View Display Error
    Odbc driver returned an error (SQLExecDirectW).
      Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 16001] ODBC error state: 60 code: 8180 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Statement(s) could not be prepared.. [nQSError: 16001] ODBC error state: 60 code: 102 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)
    SQL Issued: SELECT 0 s_0, "SD&A_Dashboard_Test"."BORIS_ALIAS_ETMS_Users"."Id" s_1, "SD&A_Dashboard_Test"."BORIS_ALIAS_ETMS_Users"."UserName" s_2 FROM "SD&A_Dashboard_Test" WHERE ("BORIS_ALIAS_ETMS_Users"."UserName" = 'trowe') FETCH FIRST 65001 ROWS ONLY 
    I am able to connect successfully to the Data Source and run a query against the database using the NQCMD command line tool so believe I have configured the DataDirect 7.0.1 drivers correctly, also I am able to view the Table Data in the RPD Physical Layer in the BI Administration Tool. So don't understand why I am getting this error.
    I have also activated the nquery.log but that doesn't really give me any further information.
    [2015-04-28T16:37:22.000+00:00] [OracleBIServerComponent] [TRACE:4] [USER-34] [] [ecid: 4a9e440f990ba0a4:-1995d2c5:14d00d3ef04:-8000-00000000000001c6,0:1:1:5] [tid: 5f] [requestid: 6f11000b] [sessionid: 6f110000] [username: borisdev] -------------------- Query Status: [nQSError: 16002] Cannot obtain number of columns for the query result. [[
    [nQSError: 16001] ODBC error state: 60 code: 102 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'..
    [nQSError: 16001] ODBC error state: 60 code: 8180 message: [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Statement(s) could not be prepared..
    [nQSError: 43119] Query Failed:
    I was wondering if anyone could shed any light on what could possibly be causing the [DataDirect][ODBC 20101 driver][Microsoft SQL Server]Incorrect syntax near 'UserName'.. error ? And also provide any suggestions on how I can troubleshoot this issue further as I am now completely out of ideas of what to do next having tried numerous things i.e. setting  IDENTIFIER_QUOTE_CHAR = '' in DBFeatures.INI which I found in similar posts on the subject all to no avail
    Regards,
    Tom Rowe

    Hi Rajagopal,
    Thanks for your reply after doing some further investigations this morning I found and corrected the problem...
    The DataDirect Driver does not like double quotes in the query for some reason, testing  using the BI Answers generated SQL with the nqcmd tool below...
    With double quotes “” it fails immediately
    Give SQL Statement: select T18706."Id" as c1, T18706."UserName" as c2 from "ETMS_Users" T18706 where ( T18706."UserName" = 'trowe' )
    select T18706."Id" as c1, T18706."UserName" as c2 from "ETMS_Users" T18706 where ( T18706."UserName" = 'trowe' )
    [102][State: S1000] [DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near 'Id'.
    Statement execute failed
    With double quotes removed for just the columns I now get the Error near ‘ETMS_Users’ which still had the double quotes
    Give SQL Statement: select T18706.Id as c1, T18706.UserName as c2 from "ETMS_Users" T18706 where ( T18706.UserName = 'trowe' )
    select T18706.Id as c1, T18706.UserName as c2 from "ETMS_Users" T18706 where ( T18706.UserName = 'trowe' )
    [102][State: S1000] [DataDirect][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near 'ETMS_Users'.
    Statement execute failed
    With all double quotes removed it works !
    Give SQL Statement: select T18706.Id as c1, T18706.UserName as c2 from ETMS_Users T18706 where ( T18706.UserName = 'trowe' )
    select T18706.Id as c1, T18706.UserName as c2 from ETMS_Users T18706 where ( T18706.UserName = 'trowe' )
    c1           c2
    42499        trowe
    Row count: 1
    Give SQL Statement:
    The solution to fix the problem is...
    In the BI Admin Tool Physical Layer Database, Properties Features tab is to delete the double quote in the Value column for IDENTIFIER_QUOTE_CHAR, setting this in the DBFeatures.INI file does not resolve the problem possibly it did in earlier versions of the product.
    Regards,
    Tom Rowe

  • ERROR in inserting values in table  PL/SQL code

    Hello Friends,
    I am facing a peculiar logical error in my PL/SQL code. PFB the code for your reference -
    for k in (select account_no from mirror_lookup_accnt_hierarchy where mdate = sys_date) LOOP
    dbms_output.put_line(' SYSDATE :!! '||sys_date||' '||k.account_no);
    insert into sfdc_account select * from mirror_sfdc_account where sap_account_id__c=k.account_no;
    commit;
    end loop;
    Just to elaborate on the code functionality......
    The outer FOR loop on the table has the records in the order i want to populate in the final sfdc_account table.
    Now, i compare the account_no of the table mirror_sfdc_account table with the account_no of the FOR LOOP and INSERT that record in the final sfdc_account table. So, it is entered according to the order i want to have.
    The problem is, this code runs fine for the first time, but then on it does not popuate the values in the right order according to the FOR LOOP values.
    I have tried deleting data and running again, but the error persists. It enters the records but NOT IN ORDER according to the condition i have given!!
    Kindly Help.....what can be the problem!!
    Thanks and Regards,

    Hi friend,
    The thing is that we need to populate the final
    table based on a hierarchy,the relation between
    parent and child fieldNo. The thing is.... that Oracle is a relational database. That means that the data is stored in a relational manner, not in an ordered manner, such as you get with COBOL and it's flat file format.
    You CANNOT rely on the database to store data in an ordered manner.
    If you require the data in some sort of order when you retrieve it then you MUST store information against the data which can be used to determine that order and you MUST specify an ORDER BY clause on your query that retrieves the data.
    Internally Oracle will not maintain the order of the data for you automatically.
    This is a simple truth.

  • While adding/Changing member in planning it gives the error "The SQL operation failed with an error code: 0"

    Hi,<BR>While adding/Changing member in planning it gives the error "The SQL operation failed with an error code: 0" and not allowing any of the changes. I am not able to open the forms giving the error as "Fiscal Days Input - is invalid". Interestingly one form was opening, when the Page selection is changed it also started giving error as like "Fisacal Days Input(form name) - is invalid check log for details". <BR>Pls advice us that what is this error and how to resolve this.<BR><BR>And Which log is to be referred for the details.<BR><BR>Thanks<BR>Ravi

    If a form is invalid it generally means that one of the dimension references is missing.<BR><BR>Can you get in to edit the form?<BR>If you can, see if you can preview it. I suspect you will not be able to.<BR><BR>If not, check all dimension boxes have at least one member against them.<BR>If you have multiple rows and/or columns check all of them too.<BR><BR>I've had a couple of forms in dev "drop" a dimension reference but only once or twice so not enough to reproduce or find out what is causing it. Each time I got the "form invalid" error message and managed to fix it.<BR><BR>Hope this helps.<BR>

  • Uncompiled PL/SQL Code error in Reports 6i

    I have made a report using Report 6i. Have compiled, saved & run it several times. Very often, when I run it, I get the error message: "Uncompiled PL/SQL code".
    Can anyone help me to get rid of this error?

    hello,
    there are some restrictions on calling specific packages from the database via a remote procedure call. DBMS_SQL is one of them. there is a built-in package called EXEC_SQL that enables you to manage dynamic SQL. use this instead of the database-packages ... for further information on the use of DBMS_* packages see the application developers guide of the database.
    regards,
    the oracle reports team

  • Rectify the error in PL/SQL code

    CMW_BC_CALC_OF_FIN_YR_SDATE is a function which returns financial start date and CMW_BC_CALC_OF_FIN_YR_EDATE returns financial end date.
    I/P: 2004, 01-jan-2003
    O/P: A
    1 CREATE OR REPLACE FUNCTION CMW_BC_A_C_R
    2 (
    3 D IN VARCHAR2, RD IN DATE
    4 ) RETURN VARCHAR2 is
    5 SDATE DATE;
    6 EDATE DATE;
    7 TYPE VARCHAR2;
    8 BEGIN
    9 SDATE:=CMW_BC_CALC_OF_FIN_YR_SDATE(D);
    10 EDATE:=CMW_BC_CALC_OF_FIN_YR_EDATE(D);
    11 If RD<EDATE and RD>SDATE
    12 then TYPE:='C';
    13 end if;
    14 If RD>EDATE
    15 then TYPE:='A';
    16 end if;
    17 If RD<SDATE
    18 then TYPE:='R';
    19 end if;
    20 return(TYPE);
    21* END;
    SQL> /
    Warning: Function created with compilation errors.
    SQL> show error;
    Errors for FUNCTION CMW_BC_A_C_R:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    4/11 PLS-00498: illegal use of a type before its declaration
    SQL>

    Hi,
    Use
    SELECT * FROM V$RESERVED_WORDS
    to know all the reserve words.
    Regards

  • Got the following reply from db-kernel: SQL-Code :-903

    Dear Experts,
    I am having a problem running MaxDB Data backup on Netbackup.... Please se log below and suggest.
    2011-04-11 13:30:38
    Using environment variable 'TEMP' with value 'C:\Windows\TEMP' as directory for temporary files and pipes.
    Using connection to Backint for MaxDB Interface.
    2011-04-11 13:30:39
    Checking existence and configuration of Backint for MaxDB.
        Using configuration variable 'BSI_ENV' = 'C:\Netbackup_Script\bsi_backint_daily.env' as path of the configuration file of Backint for MaxDB.
        Setting environment variable 'BSI_ENV' for the path of the configuration file of Backint for MaxDB to configuration value 'C:\Netbackup_Script\bsi_backint_daily.env'.
        Reading the Backint for MaxDB configuration file 'C:\Netbackup_Script\bsi_backint_daily.env'.
            Found keyword 'BACKINT' with value 'D:\sapdb\KGP\db\bin\backint.exe'.
            Found keyword 'INPUT' with value 'E:\sapdb\data\wrk\KGP\backint.input'.
            Found keyword 'OUTPUT' with value 'E:\sapdb\data\wrk\KGP\backint.output'.
            Found keyword 'ERROROUTPUT' with value 'E:\sapdb\data\wrk\KGP\backint.error'.
            Found keyword 'PARAMETERFILE' with value 'C:\Netbackup_Script\backint_parameter_daily.txt'.
        Finished reading of the Backint for MaxDB configuration file.
        Using 'D:\sapdb\KGP\db\bin\backint.exe' as Backint for MaxDB program.
        Using 'E:\sapdb\data\wrk\KGP\backint.input' as input file for Backint for MaxDB.
        Using 'E:\sapdb\data\wrk\KGP\backint.output' as output file for Backint for MaxDB.
        Using 'E:\sapdb\data\wrk\KGP\backint.error' as error output file for Backint for MaxDB.
        Using 'C:\Netbackup_Script\backint_parameter_daily.txt' as parameter file for Backint for MaxDB.
        Using '300' seconds as timeout for Backint for MaxDB in the case of success.
        Using '300' seconds as timeout for Backint for MaxDB in the case of failure.
        Using 'E:\sapdb\data\wrk\KGP\dbm.knl' as backup history of a database to migrate.
        Using 'E:\sapdb\data\wrk\KGP\dbm.ebf' as external backup history of a database to migrate.
        Checking availability of backups using backint's inquire function.
    Check passed successful.
    2011-04-11 13:30:39
    Checking medium.
    Check passed successfully.
    2011-04-11 13:30:39
    Preparing backup.
        The environment variable 'BSI_ENV' has already the value 'C:\Netbackup_Script\bsi_backint_daily.env'.
        Setting environment variable 'BI_CALLER' to value 'DBMSRV'.
        Setting environment variable 'BI_REQUEST' to value 'NEW'.
        Setting environment variable 'BI_BACKUP' to value 'FULL'.
        Constructed Backint for MaxDB call 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\backint_parameter_daily.txt -i E:\sapdb\data\wrk\KGP\backint.input -c'.
        Created temporary file 'E:\sapdb\data\wrk\KGP\backint.output' as output for Backint for MaxDB.
        Created temporary file 'E:\sapdb\data\wrk\KGP\backint.error' as error output for Backint for MaxDB.
        Writing 'D:\sapdb\pipe2 #PIPE' to the input file.
    Prepare passed successfully.
    2011-04-11 13:30:39
    Starting database action for the backup.
        Requesting 'SAVE DATA QUICK TO 'D:\sapdb\pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKDBFULL'' from db-kernel.The database is working on the request.
    2011-04-11 13:30:39
    Waiting until database has prepared the backup.
        Asking for state of database.
        2011-04-11 13:30:39 Database is still preparing the backup.
        Waiting 1 second ... Done.
        Asking for state of database.
        2011-04-11 13:30:41 Database has finished preparation of the backup.
    The database has prepared the backup successfully.
    2011-04-11 13:30:41
    Starting Backint for MaxDB.
        Starting Backint for MaxDB process 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\backint_parameter_daily.txt -i E:\sapdb\data\wrk\KGP\backint.input -c >>E:\sapdb\data\wrk\KGP\backint.output 2>>E:\sapdb\data\wrk\KGP\backint.error'.
        Process was started successfully.
    Backint for MaxDB has been started successfully.
    2011-04-11 13:30:41
    Waiting for end of the backup operation.
        2011-04-11 13:30:41 The backup tool is running.
        2011-04-11 13:30:41 The database is working on the request.
        2011-04-11 13:30:43 The database has finished work on the request.
        Receiving a reply from the database kernel.
        Got the following reply from db-kernel:
            SQL-Code              :-903
        2011-04-11 13:30:43 The backup tool is running.
        2011-04-11 13:30:44 The backup tool process has finished work with return code 2.
    The backup operation has ended.
    2011-04-11 13:30:44
    Filling reply buffer.
        Have encountered error -24920:
            The backup tool failed with 2 as sum of exit codes. The database request failed with error -903.
        Constructed the following reply:
            ERR
            -24920,ERR_BACKUPOP: backup operation was unsuccessful
            The backup tool failed with 2 as sum of exit codes. The database request failed with error -903.
    Reply buffer filled.
    2011-04-11 13:30:44
    Cleaning up.
        Copying output of Backint for MaxDB to this file.
    Begin of output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.output)----
            Reading parameter file C:\Netbackup_Script\backint_parameter_daily.txt.
            Using D:\sapdb\KGP\db\bin\backint.exe as Backint for Oracle.
            Using C:\Netbackup_Script\nt_initKGPdaily.utl as parameterfile of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backinthistory.log as history file.
            Using E:\sapdb\data\wrk\KGP\backintoracle.in as input of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backintoracle.out as output of Backint for Oracle.
            Using E:\sapdb\data\wrk\KGP\backintoracle.err as error output of Backint for Oracle.
            Using staging area D:\sapdb\Stage1 with a size of 2147483648 bytes.
            Reading input file E:\sapdb\data\wrk\KGP\backint.input.
            Backing up pipe D:\sapdb\pipe2.
            Found 1 entry in the input file.
            Starting the backup.
            Starting pipe2file program(s).
            Waiting for creation of temporary files.
            1 temporary file is available for backup.
            Calling Backint for Oracle at 2011-04-11 13:30:43.
            Calling 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -p C:\Netbackup_Script\nt_initKGPdaily.utl -i E:\sapdb\data\wrk\KGP\backintoracle.in -c' .
            Backint for Oracle ended at 2011-04-11 13:30:43 with return code 2.
            Backint for Oracle output: Reading parameter file C:\Netbackup_Script\nt_initKGPdaily.utl.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.in as input of Backint for Oracle.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.out as output of Backint for Oracle.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backint4oracle.err as error output of Backint for Oracle.
            Backint for Oracle output: Using staging area D:\sapdb\Stage1 with a size of 2147483648 bytes.
            Backint for Oracle output: Using E:\sapdb\data\wrk\KGP\backinthistory.log as history file.
            Backint for Oracle output: Using D:\sapdb\KGP\db\bin\backint.exe as Backint for Oracle.
            Backint for Oracle output:
            Backint for Oracle output: Reading input file E:\sapdb\data\wrk\KGP\backintoracle.in.
            Backint for Oracle output: Backing up file D:\sapdb\Stage1.0.
            Backint for Oracle output: Found 1 entry in the input file.
            Backint for Oracle output:
            Backint for Oracle output: Starting the backup.
            Backint for Oracle output: Starting pipe2file program(s).
            Backint for Oracle output:
            Backint for Oracle output: Calling Backint for Oracle at 2011-04-11 13:30:43.
            Backint for Oracle output: Calling 'D:\sapdb\KGP\db\bin\backint.exe -u KGP -f backup -t file -i E:\sapdb\data\wrk\KGP\backint4oracle.in -c' .
            Backint for Oracle output: Backint for Oracle ended at 2011-04-11 13:30:43 with return code 2.
            Backint for Oracle output: Backint for Oracle output: Reading parameter file .
            Backint for Oracle output: Backint for Oracle output:
            Backint for Oracle output: Backint for Oracle output:
            Backint for Oracle output: Backint for Oracle error output: No staging area is defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The path of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the history file is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the input file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the output file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output: The name of the error output file of Backint for Oracle is not defined in the parameter file.
            Backint for Oracle output: Backint for Oracle error output:
            Backint for Oracle output:
            Backint for Oracle output: Finished the backup unsuccessfully.
            Backint for Oracle output:
            Backint for Oracle output: #ERROR D:\sapdb\Stage1.0
            Backint for Oracle output:
            Backint for Oracle error output: Backint for Oracle was unsuccessful.
            Backint for Oracle error output:
            Finished the backup unsuccessfully.
            #ERROR D:\sapdb\pipe2
    End of output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.output)----
        Removed Backint for MaxDB's temporary output file 'E:\sapdb\data\wrk\KGP\backint.output'.
        Copying error output of Backint for MaxDB to this file.
    Begin of error output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.error)----
            Backint for Oracle was unsuccessful.
    End of error output of Backint for MaxDB (E:\sapdb\data\wrk\KGP\backint.error)----
        Removed Backint for MaxDB's temporary error output file 'E:\sapdb\data\wrk\KGP\backint.error'.
        Removed the Backint for MaxDB input file 'E:\sapdb\data\wrk\KGP\backint.input'.
    Have finished clean up successfully.

    >     Requesting 'SAVE DATA QUICK TO 'D:\sapdb\pipe2' PIPE BLOCKSIZE 8 NO CHECKPOINT MEDIANAME 'BACKDBFULL'' from db-kernel.The database is working on the request.
    This seems to be your problem, the pipe is wrongly defined. On Windows it looks like
    \\.\pipe1
    see
    http://msdn.microsoft.com/en-us/library/aa365783.aspx
    Markus

  • REPORT WITH PL/SQL  CODE

    DECLARE
    SQ VARCHAR2(100);
    BEGIN
    SQ := 'SELECT * FROM EMP WHERE EMPNO=7788';
    RETURN SQ;
    END
    THE ABOVE PL/SQL CODE WORKING FINE
    BUT I NEED CONDITION BASED ON ENAME
    SQ:='SELECT * FROM EMP WHERE ENAME=''SCOTT'';
    IT IS GIVEING ERROR
    WHAT TO DO?

    Hi,
    You're missing the final quote - you have the quotes for SCOTT but not the one to close the SQ string:
    DECLARE
    SQ VARCHAR2(100);
    BEGIN
    SQ := 'SELECT * FROM EMP WHERE EMPNO=''SCOTT''';
    RETURN SQ;
    ENDAndy

  • Error #3115: SQL Error.', details:'no such table

    Hi,
    I'm creating my Adobe Air App using Flash CS5 Professional and facing exactly the following error.
    SQLError: 'Error #3115: SQL Error.', details:'no such table: 'categories'', operation:'execute', detailID:'2013'
    My SQLite Db has been created using Firefox extension - SQLite Manager. The db file is placed into the same folder as the .fla and .swf files. The db has three tables namely: categories, period and activity. I don't understand why I'm getting this error. I have even tried copy pasting other source code from AS 3.0 reference guide but same error every time.
    The code below is a modified version of example code in AS 3.0 reference documentation. Can you suggest how the above error can be fixed?
    /you can also reply to me directly at [email protected]
    /regards
    import flash.data.SQLConnection;
    import flash.data.SQLResult;
    import flash.data.SQLStatement;
    import flash.display.Sprite;
    import flash.events.SQLErrorEvent;
    import flash.events.SQLEvent;
    import flash.filesystem.File;
    var conn:SQLConnection;
    var insertCategory:SQLStatement;
    var dbFile:File;
    databaseConnect();
    function databaseConnect():void
    // define where to find the database file
    var appStorage:File = File.applicationStorageDirectory;
    dbFile = appStorage.resolvePath("MyBudgetCalc.db");
    // open the database connection
    conn = new SQLConnection();
    conn.addEventListener(SQLErrorEvent.ERROR, errorHandler);
    conn.addEventListener(SQLEvent.OPEN, openHandler);
    trace("dbFile.exists:"+ dbFile.exists);
    conn.openAsync(dbFile);
    // Called when the database is connected
    function openHandler(event:SQLEvent):void
    conn.removeEventListener(SQLEvent.OPEN, openHandler);
    // start a transaction
    //Object(this).inputfield.text = "openHandler called.. ";
    conn.addEventListener(SQLEvent.BEGIN, beginHandler);
    conn.begin();
    trace("exiting openHandler..");
    // Called when the transaction begins
    function beginHandler(event:SQLEvent):void
    conn.removeEventListener(SQLEvent.BEGIN, beginHandler);
    //trace("beginHandler - SQLEvent message: "+SQLEvent.message);
    Object(this).inputfield.text = "beginHandler called.. ";
    insertCategory = new SQLStatement();
    insertCategory.sqlConnection = conn;
    insertCategory.text = "INSERT INTO categories(id, name) VALUES (', Auto')";
    insertCategory.execute();
    insertCategory.addEventListener(SQLEvent.RESULT, insertCategoryHandler);
        insertCategory.addEventListener(SQLErrorEvent.ERROR, errorHandler);
    trace("exiting beginHandler..");
    // Called after the phone number record is inserted
    function insertCategoryHandler(event:SQLEvent):void
    insertCategory.removeEventListener(SQLEvent.RESULT, insertCategoryHandler);
    insertCategory.removeEventListener(SQLErrorEvent.ERROR, errorHandler);
    // No errors so far, so commit the transaction
    conn.addEventListener(SQLEvent.COMMIT, commitHandler);
    conn.commit();
    trace("exiting insertCategoryHandler after conn.commit()..");
    // Called after the transaction is committed
    function commitHandler(event:SQLEvent):void
    conn.removeEventListener(SQLEvent.COMMIT, commitHandler);
    trace("exiting commitHandler(): Transaction complete..");
    // Called whenever an error occurs
    function errorHandler(event:SQLErrorEvent):void
    trace("entering errorHandler()..");
    // If a transaction is happening, roll it back
    if (conn.inTransaction)
    conn.addEventListener(SQLEvent.ROLLBACK, rollbackHandler);
    conn.rollback();
    trace(event.error.message);
    trace(event.error.details);
    trace("exiting errorHandler()..");
    // Called when the transaction is rolled back
    function rollbackHandler(event:SQLEvent):void
    conn.removeEventListener(SQLEvent.ROLLBACK, rollbackHandler);

    Can you try creating the table using the AIR ActionScript APIs? It is possible the SQLLite Manager program that you are using is creating a database that isn't compatible with AIR.

  • "no data found" run-time error masking SQL/report mismatch

    Hi all,
    At last, figured out a vexing problem and wondering if anyone else either:
    a) has also hit the problem, and hopefully
    b) has figured out a clever way around it.
    Namely, in our AppEx apps, we rely on SQL query generation from PL/SQL packaged functions. This "best practice" promotes reuse, automated testing, etc. Great idea - works great.
    However, we've repeatedly come across a situation where we go to run a page with a report on it only to get a "report error: ORA-01403: no data found" message where the report should be. Not much to go on. After trial and error, it turns out that simply going to the Region Definition page (where the PL/SQL function call is defined) and clicking the "Apply Changes" button cleared the problem up.
    Mystifying because the actual SQL query generated by the PL/SQL is valid (we've got a nightly testing job that pulls the PL/SQL function calls out of the AppEx metadata tables, executes them to get back the SQL and then validates the SQL).
    Turns out this problem looks to be a result of columns changing in the actual SQL itself, and hence not matching up to the Region Attributes (column names, one assumes) that AppEx knows about. Simply clicking Apply Changes causes AppEx to validate the returned query and then it adjusts the column attributes (one assumes) so that things match up.
    So - the $64,000 question(s):
    1) Are there any cool AppEx APIs to be able to try and detect this situation? Given an app of middling complexity (50-100 pages, each with various queries/reports), this is not an attractive issue to deal with manually.
    2) Any cool AppEx APIs to fix, or auto-sync these situations? (Essentially programmatically calling the "Apply Changes" button if you will).
    At a minimum, it would be great if AppEx could be updated to put out some kind of more informative error message when this occurs - maybe something along the lines of "Region Attributes Do Not Match Data Returned from Query", or something like that at least.
    Thanks for any input/ideas,
    Jim C.

    Thanks to all for your prompt responses.
    Vikas actually did me the favor of pretty much clarifying my info for me (tks Vikas). Yes, to all the above. It's PL/SQL code generating a SQL query, so 1 is (a); we want to use query-specific columns so it is (2a). And yes, the whole problem is that the something does change to cause the SELECT statement column list to change...nature of the beast, so "don't do that" doesn't really help here.
    Scott - sorry, should have been more explicit. Basically, we have a PL/SQL function behind a report that returns a SQL statement for the report. If that PL/SQL code changes to add a new column to the report (without going to the corresponding Report Attributes page and clicking the "Apply Changes" button to get AppEx to revalidate the query), then you wind up with this "no data found" error msg, which doesn't exactly point you to the root of the problem.
    It seems as though the "parse at compile-time" is really what's going on here. There must be some kind of "run-time" check going on as well, that is resulting in the "no data found" message. Seems as though it ought to be fairly straightforward to add some kind of check at run-time to handle that exception a little cleaner. Is there an official process to register a "Request for Process Enhancement" for AppEx to do this?
    In the meantime, thank you Vikas for the pointer to the APEX_APPLICATION_PAGE_RPT_COLS view - that looks like it will do the trick nicely. Given that, we can now add logic to our nightly "app tester" job that can compare what columns AppEx expects to find in a given report (for a given page) with the actual SQL (coming back from the PL/SQL function call) to essentially "validate" the AppEx meta data and at least let us know when these things get out of sync.
    BTW - if anyone would be interested in the actual contents of that "app tester" logic, I'd be happy to post it (someplace...here? Studio site?). It's basically just a PL/SQL block of code that currently runs in cron that just validates any SQL embedded in our app. (I suppose it is a little "hard-coded" since it does use our naming conventions for packages/functions to parse the PL/SQL calls from the Meta Data but it might still serve as a usefull starting point...) Since our AppEx app(s) sit on top of a database schema that is in fairly constant flux, we need the ability to know when somebody has changed something in the schema that needs to be accounted for in AppEx. The job primarily just parses the AppEx meta data to find PL/SQL function calls that return SQL, executes that PL/SQL to get the generated SQL, then just validates that SQL and reports back any invalid SQL calls. Perhaps we're in some unusual development environment (15-20 people working on a database schema with 700-800 tables/views) but it seems as though it would be fairly easy, for anybody using PL/SQL to generate SQL (which is a GREAT and powerful thing, by the way - thanks to whoever thought that up in AppEx land) to run into this issue.
    Jim C.

  • PL/SQL Code not working without debug statements

    Hi Guys,
    I have a pl/sql code in a procedure, logic iterates through almost 40K records, conditional delete and update.
    When I execute this code, I dont see the deletes and updates happening, though procedure executes for 8 minutes and exits wihtout any error, execption.
    In same procedure when I write some debug statements like dbms_output, then everything seems to be working fine.
    I know this scenario happens in Oracle Forms, wehre we use SYNCHRONIZE.
    But this is plain pl/sql procedure.
    any thoughts on this?
    Av.

    COMMIT ?
    Aside from that, no idea what your procedure looks like, what it does, what version of Oracle you are using, how you are determining "I dont see the deletes and updates happening". etc...
    You'd need to provide a slew of information for anyone to give you any meaningful help.
    I can only assure you that DBMS_OUTPUT doesn't do magic :)

  • Error while running code template mapping between two oracle tables

    Hello All
    Iam getting the following error while running code template mapping between two oracle tables. Using OWB 11gR2 and oracle 11gR2 DB.
    java.sql.SQLException: ORA-20001: The active workspace is not valid as a target for this mapping
    c: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1065
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1087
    ORA-06512: at "SOURCE.FILENET_EX_UNIT_3", line 555
    ORA-06512: at line 4                                        
    Job 51 error: java.sql.SQLException: ORA-20001: The active workspace is not valid as a target for this mapping
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1065
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1087
    ORA-06512: at "SOURCE.FILENET_EX_UNIT_3", line 555
    ORA-06512: at line 4
    Quick help is highly appreciated.

    Dera Dallan
    its only a target user for the workspace where you are deploying the mapping from.
    I have two repositories for two different projects. each repositary has its own workspace.
    ex:-
    Project 1
    Work space bpms_rep_owner
    Repositary owner bpms_rep_owner
    Repositary user bpms_rep_user
    Project 2
    Work space dem_rep_owner
    Repositary owner dem_rep_owner
    Repositary user dem_rep_user
    Reg
    S.Gyazuddin

  • Query SQL code gets deleted after export to Excel. "Query must have at least one destination field"

    Hi all,
    I'm getting really frustrated by this Access error. It happens when I export the result of a query through an Access macro to Excel, the first time it runs well but the next time, there is a chance that the query won't run and the error "Query
    must have at least one destination field" will be displayed. After that, I try to check the query SQL code and discover the code has vanished. I'm using simple Select query without joins, only "where", "group by" and "order by"
    statements.
    Thank you in advance for your help,
    Jesus 
    Edit:
    One of these queries are like the following (all of them are of this type):
    SELECT Field1, field2, field3, field4, field5, Sum(Field6) AS SumOfField6, Sum(Field7) AS SumOfField7
    FROM Table1
    WHERE Field6 is not null
    GROUP BY Field1, field2, field3, field4, field5
    Order By Sum(Field6) desc

    Hi Peter, 
    Thank you for your response, I updated the original question with one of the codes.
    Thanks,
    Jesus

Maybe you are looking for

  • Ora-04030 out of process memory

    Hai All, My database is oracle 9i(9.2.0.1.0)in AIX when I run one query from my oracle developer suite session then 'ora-04030 out of process memory error when trying to allocate 38424 bytes (hash-join subh,klcqc:kllcqslt)' This same query when I run

  • Having internet connection problems

    I have been having problems connecting to the internet.  I have an iMac, and frequently my internet connection drops, then I have to turn wi-fi off and turn wi-fi back on. This can happen repeatedly, sometimes in switching from one webpage to another

  • The microphone on my iphone its not working!!

    Hi here's what happend, after a download of the new iphone software the microphone on my iphone stopped working, i restarted it, restored it, and everything else and still doesn't work, how can i get it to work again?? nothing in your forums or suppo

  • Map Styles to XML Tags

    Hi, My InDesign cc2014 freezes when I apply manually  'mapStylestoXMLTags' to a document. any idea? Thank you,

  • Migrating from Outlook to Mail

    Hi all, I purchased my iMac several months ago after years of Windows experience. As a trial of course, but now I am so happy with it that my once beloved Dell notebook running XP seems to have lost it's glory completely. So I will be going for a nic