Error in the below sql.

Hi
I am getting the below error in the below sql
Hi
I am getting the error in the below sql
DECLARE
   pgm_id                  NUMBER := &1;
   schd_dt                 DATE := TO_DATE('&2','MM/DD/YYYY');
   l_schd_dt               DATE := NULL;
   l_pgm_id                NUMBER :=0;
   l_src_id                NUMBER;
   l_bulkCollectSize       NUMBER;
   l_trace_level           NUMBER := 0;
   l_CommitAllowance       INFT1.PRM_VALUE%TYPE;
   v_insrcdcnt             NUMBER := 0;
   g_ErrorString           VARCHAR2(500) := NULL;
   g_log_error             VARCHAR2(300) := NULL;
   g_recs_upd              NUMBER :=0;
   g_recs_ins              NUMBER :=0;
   g_aud_upd_ts            DATE := NULL;
   l_data_nbr              NUMBER := 0;
   l_ts_1             DATE :=NULL;
   l_ts_2               DATE :=NULL;
   l_rest_empno  emp_STG.mbr_nbr%TYPE :='0';
  l_Commitsize            NUMBER;
   CURSOR curTrnRecs(l_rest_empno VARCHAR)
   IS
    SELECT /* user_hash(tmp) PARALLEL(tmp,8) */  tmp.sec_lbl
    ,tmp.empno
     ,tmp.ename
    ,tmp.sal
    ,tmp.deptno
       FROM emp_stg tmp where tmp.mbr_nbr > l_rest_empno   order by tmp.mbr_nbr;
   TYPE rec_emp_stg is TABLE OF emp_STG%ROWTYPE index by PLS_INTEGER;
  stg_emp_stg rec_emp_stg   ;
   counter                 NUMBER         :=0;
   l_idx                  NUMBER;
   errors                  PLS_INTEGER;
    ins_errors EXCEPTION;
    PRAGMA EXCEPTION_INIT(ins_errors, -24381);
BEGIN
    /* Copy values into local variables */
    l_pro:= pgm_id;
    l_schd_dt := schd_dt;
        /* Check if this is the first execution of the program; Get the last processed timestamp if the run is a restart */
    /* The restartability of this program is slightly differnt. Data_nbr =1 indicates that the last run was successful. The same program can*/
    /* be called multiple times for the same t47date. The restartability is designed accordingly */
    BEGIN
        SELECT /* SQL_TAG(<$RCSfile: t50lyt_can_hist_trans_load.sql,v $><2>) */
               data_nbr,1,1,
                NVL(key_text,'0')
        INTO l_data_nbr,
             l_ts_1,
             l_ts_2,
             l_rest_mbr_nbr
        FROM inft
        WHERE TRUNC(key_ts)=TRUNC(l_schd_dt)
          AND pro_id = l_pro_id;
    EXCEPTION
        WHEN NO_DATA_FOUND THEN
          l_data_nbr:=9;
          NULL;
        WHEN OTHERS then
          g_ErrorString := g_log_error||' : SQLCODE = '||SQLCODE||' , ERRORMESSAGE = '||substr(SQLERRM, 1,200);
          RAISE;
    END;
       IF l_data_nbr = 1 THEN
      crm_msg.msg('Exiting:: Program already run');
      RETURN;
    ELSIF l_data_nbr = 0 THEN
      crm_msg.msg('This is a restart for the date '||l_schd_dt);
    ELSIF l_data_nbr= 9 THEN
        crm_msg.msg('First execution of this program');
   END IF;  
    BEGIN
        if l_data_nbr =9 THEN
         crm_msg.msg('This is the First execution of this program');
         INSERT
         INTO inft
           pgm_id,
           key_ts,
           key_text,
           data_nbr,
           data_ts,
           data_text
         VALUES
           l_pro,
           l_schd_dt,
           0,  --to hold empno
           sysdate,
           0   --no of recs processed
   COMMIT;
    END IF;
  END;
    OPEN curTrn(l_rest_empno);
    LOOP
      BEGIN
           FETCH curTrn BULK COLLECT INTO stg_emp_rec LIMIT 50000;
           IF nvl(curTrnRecs%ROWCOUNT,0)=0 THEN
             crm_msg.msg('No Historical Data');
           END IF;
       FORALL i in 1..stg_emp_rec.COUNT SAVE EXCEPTIONS
         INSERT INTO emp values stg_emp_stg(i);
      counter := counter + 1;         
       g_recs_ins   := g_recs_ins+SQL%ROWCOUNT;
   EXCEPTION
      WHEN ins_errors THEN
         errors := SQL%BULK_EXCEPTIONS.COUNT;
        for j in 1..errors
        LOOP
        l_idx :=sql%bulk_exceptions(j).error_index;
      UPDATE emp SET src_id=stg_emp_rec(i).empno,ename=stg_emp_rec(i).ename,sal = stg_emp_rec(i).sal,
             WHERE deptno= stg_emp_rec(i).deptno;  
       g_recs_upd := g_recs_upd + SQL%ROWCOUNT;
   ---END;
-- EXIT WHEN curTrnRecs%NOTFOUND;
-- END LOOP;
-- CLOSE curTrnRecs;
  EXCEPTION
   WHEN OTHERS THEN
   g_ErrorString := g_log_error||' : SQLCODE = '||SQLCODE||' , ERRORMESSAGE = '||substr(SQLERRM, 1,200);
   crm_msg.msg(g_ErrorString);
   RAISE;
   END;
END
    IF (counter >= l_CommitSize) THEN
        BEGIN /* To keep track of the timestamp of the last record processed inthe batch; for restartability */
                                        UPDATE   inft
                    SET      data_ts      = SYSDATE
                           ,key_text     = l_empno (idx)
                    WHERE    pgm_id       = l_pgm_id
                     AND     TRUNC(key_ts)= TRUNC(l_schd_dt);
                    COMMIT;
                counter:=0;
                END IF;
            EXCEPTION
                    WHEN OTHERS THEN
                      g_ErrorString := g_log_error||' : SQLCODE = '||SQLCODE||' , ERRORMESSAGE = '||substr(SQLERRM, 1,200);
                      crm_msg.msg(g_ErrorString);
                      RAISE;
            END;
   COMMIT;
  EXIT WHEN curTrn%NOTFOUND;
--       END LOOP; --End of looping for the main cursor  fetch
   END LOOP;
  CLOSE curTrn;
   BEGIN /* Update the data_nbr to 1 to indicate the update is complete */
         UPDATE inft
         SET data_nbr=1,
             data_ts=nvl(g_aud_upd_ts,data_ts),
             data_text = counter
         WHERE pro_id = l_pgm_id
          AND TRUNC(key_ts)=TRUNC(l_schd_dt);
        COMMIT;
       EXCEPTION
         WHEN OTHERS THEN
           g_ErrorString := g_log_error||' : SQLCODE = '||SQLCODE||' , ERRORMESSAGE = '||substr(SQLERRM, 1,200);
           crm_msg.msg(g_ErrorString);
           RAISE;
    END;
    g_log_error := 'LOGGING SUMMARY';
    crm_msg.msg_tab('RECS UPDATED',g_recs_upd);
    crm_msg.msg_tab('RECS INSERTED',g_recs_ins);
    crm_msg.msg('Program ends Successfully');
EXCEPTION
   WHEN OTHERS THEN
     g_ErrorString := g_log_error||' : SQLCODE = '||SQLCODE||' , ERRORMESSAGE = '||substr(SQLERRM, 1,200);
     crm_msg.msg(g_ErrorString);
END;
Elapsed: 00:00:00.00
  EXCEPTION
ERROR at line 248:
ORA-06550: line 248, column 3:
PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
( begin case declare end exit for goto if loop mod null
pragma raise return select update when while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << continue close current delete fetch lock
insert open rollback savepoint set sql execute commit forall
merge pipe purge
ORA-06550: line 255, column 5:
PLS-00103: Encountered the symbol "IF" when expecting one of the following:
ORA-06550: line 314, column 2:
PLS-00103: Encountered the symbol "EXCEPTION" when expecting one of the following:
( begin case declare end exit for goto if loop mod null
pragma raise return select update while with <an identifier>
<a double-quoted delimited-
ORA-06550: line 322, column 0:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
end not pragma final instantiable order overriding static
member constructor mapAppreciate ur help on the above?
Edited by: user1014019 on Oct 3, 2011 6:45 AM
Edited by: BluShadow on 03-Oct-2011 15:08
added {noformat}{noformat} tags. Please read {message:id=9360002} and learn to do this yourself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Please provide a code that can be compiled, the sample that you provided has compilation errors:
Have made change to your code block, so that it compiles.Try to run the below code block:
/* Formatted on 2011/10/03 21:08 (Formatter Plus v4.8.5) */
DECLARE
   pgm_id              NUMBER                 := &1;
   schd_dt             DATE                   := TO_DATE ('&2', 'MM/DD/YYYY');
   l_schd_dt           DATE                   := NULL;
   l_pgm_id            NUMBER                 := 0;
   l_src_id            NUMBER;
   l_bulkcollectsize   NUMBER;
   l_trace_level       NUMBER                 := 0;
   l_commitallowance   inft1.prm_value%TYPE;
   v_insrcdcnt         NUMBER                 := 0;
   g_errorstring       VARCHAR2 (500)         := NULL;
   g_log_error         VARCHAR2 (300)         := NULL;
   g_recs_upd          NUMBER                 := 0;
   g_recs_ins          NUMBER                 := 0;
   g_aud_upd_ts        DATE                   := NULL;
   l_data_nbr          NUMBER                 := 0;
   l_ts_1              DATE                   := NULL;
   l_ts_2              DATE                   := NULL;
   l_rest_empno        emp_stg.mbr_nbr%TYPE   := '0';
   l_commitsize        NUMBER;
   CURSOR curtrnrecs (l_rest_empno VARCHAR)
   IS
      SELECT /* user_hash(tmp) PARALLEL(tmp,8) */ tmp.sec_lbl, tmp.empno,
                tmp.ename, tmp.sal, tmp.deptno
          FROM emp_stg tmp
         WHERE tmp.mbr_nbr > l_rest_empno
      ORDER BY tmp.mbr_nbr;
   TYPE rec_emp_stg IS TABLE OF emp_stg%ROWTYPE
      INDEX BY PLS_INTEGER;
   stg_emp_stg         rec_emp_stg;
   counter             NUMBER                 := 0;
   l_idx               NUMBER;
   ERRORS              PLS_INTEGER;
   ins_errors          EXCEPTION;
   PRAGMA EXCEPTION_INIT (ins_errors, -24381);
BEGIN
   /* Copy values into local variables */
   l_pro := pgm_id;
   l_schd_dt := schd_dt;
       /* Check if this is the first execution of the program; Get the last processed timestamp if the run is a restart */
   /* The restartability of this program is slightly differnt. Data_nbr =1 indicates that the last run was successful. The same program can*/
   /* be called multiple times for the same t47date. The restartability is designed accordingly */
   BEGIN
      SELECT /* SQL_TAG(<$RCSfile: t50lyt_can_hist_trans_load.sql,v $><2>) */
             data_nbr, 1, 1, NVL (key_text, '0')
        INTO l_data_nbr, l_ts_1, l_ts_2, l_rest_mbr_nbr
        FROM inft
       WHERE TRUNC (key_ts) = TRUNC (l_schd_dt) AND pro_id = l_pro_id;
   EXCEPTION
      WHEN NO_DATA_FOUND
      THEN
         l_data_nbr := 9;
         NULL;
      WHEN OTHERS
      THEN
         g_errorstring :=
               g_log_error
            || ' : SQLCODE = '
            || SQLCODE
            || ' , ERRORMESSAGE = '
            || SUBSTR (SQLERRM, 1, 200);
         RAISE;
   END;
   IF l_data_nbr = 1
   THEN
      crm_msg.msg ('Exiting:: Program already run');
      RETURN;
   ELSIF l_data_nbr = 0
   THEN
      crm_msg.msg ('This is a restart for the date ' || l_schd_dt);
   ELSIF l_data_nbr = 9
   THEN
      crm_msg.msg ('First execution of this program');
   END IF;
   BEGIN
      IF l_data_nbr = 9
      THEN
         crm_msg.msg ('This is the First execution of this program');
         INSERT INTO inft
                     (pgm_id, key_ts, key_text, data_nbr, data_ts, data_text
              VALUES (l_pro, l_schd_dt, 0,                     --to hold empno
                                          SYSDATE, 0    --no of recs processed
         COMMIT;
      END IF;
   END;
   OPEN curtrn (l_rest_empno);
   LOOP
      BEGIN
         FETCH curtrn
         BULK COLLECT INTO stg_emp_rec LIMIT 50000;
         IF NVL (curtrnrecs%ROWCOUNT, 0) = 0
         THEN
            crm_msg.msg ('No Historical Data');
         END IF;
         FORALL i IN 1 .. stg_emp_rec.COUNT SAVE EXCEPTIONS
            INSERT INTO emp
                 VALUES stg_emp_stg (i);
         counter := counter + 1;
         g_recs_ins := g_recs_ins + SQL%ROWCOUNT;
      EXCEPTION
         WHEN ins_errors
         THEN
            ERRORS := SQL%BULK_EXCEPTIONS.COUNT;
            FOR j IN 1 .. ERRORS
            LOOP
               l_idx := SQL%BULK_EXCEPTIONS (j).ERROR_INDEX;
               UPDATE emp
                  SET src_id = stg_emp_rec (i).empno,
                      ename = stg_emp_rec (i).ename,
                      sal = stg_emp_rec (i).sal
                WHERE deptno = stg_emp_rec (i).deptno;
               g_recs_upd := g_recs_upd + SQL%ROWCOUNT;
            END LOOP;
--END;
         -- EXIT WHEN curTrnRecs%NOTFOUND;
--END LOOP;
--CLOSE curTrnRecs;
         WHEN OTHERS
         THEN
            g_errorstring :=
                  g_log_error
               || ' : SQLCODE = '
               || SQLCODE
               || ' , ERRORMESSAGE = '
               || SUBSTR (SQLERRM, 1, 200);
            crm_msg.msg (g_errorstring);
            RAISE;
      END;
      IF (counter >= l_commitsize)
      THEN
         BEGIN
/* To keep track of the timestamp of the last record processed inthe batch; for restartability */
            UPDATE inft
               SET data_ts = SYSDATE,
                   key_text = l_empno (idx)
             WHERE pgm_id = l_pgm_id AND TRUNC (key_ts) = TRUNC (l_schd_dt);
            COMMIT;
            counter := 0;
         EXCEPTION
            WHEN OTHERS
            THEN
               g_errorstring :=
                     g_log_error
                  || ' : SQLCODE = '
                  || SQLCODE
                  || ' , ERRORMESSAGE = '
                  || SUBSTR (SQLERRM, 1, 200);
               crm_msg.msg (g_errorstring);
               RAISE;
         END;
      END IF;
      COMMIT;
      EXIT WHEN curtrn%NOTFOUND;
--       END LOOP; --End of looping for the main cursor  fetch
   END LOOP;
   CLOSE curtrn;
   BEGIN     /* Update the data_nbr to 1 to indicate the update is complete */
      UPDATE inft
         SET data_nbr = 1,
             data_ts = NVL (g_aud_upd_ts, data_ts),
             data_text = counter
       WHERE pro_id = l_pgm_id AND TRUNC (key_ts) = TRUNC (l_schd_dt);
      COMMIT;
   EXCEPTION
      WHEN OTHERS
      THEN
         g_errorstring :=
               g_log_error
            || ' : SQLCODE = '
            || SQLCODE
            || ' , ERRORMESSAGE = '
            || SUBSTR (SQLERRM, 1, 200);
         crm_msg.msg (g_errorstring);
         RAISE;
   END;
   g_log_error := 'LOGGING SUMMARY';
   crm_msg.msg_tab ('RECS UPDATED', g_recs_upd);
   crm_msg.msg_tab ('RECS INSERTED', g_recs_ins);
   crm_msg.msg ('Program ends Successfully');
EXCEPTION
   WHEN OTHERS
   THEN
      g_errorstring :=
            g_log_error
         || ' : SQLCODE = '
         || SQLCODE
         || ' , ERRORMESSAGE = '
         || SUBSTR (SQLERRM, 1, 200);
      crm_msg.msg (g_errorstring);
END;Hope its useful.
Cheers

Similar Messages

  • How to find where the below sql is used in database

    Hi all,
    I am tring to find the below SQL in our data base where it is used?
    I had done the checking in all reports manually, But have no luck.
    But i am sure that the below sql is in our data base and having some issue on it.
    Can any one please let me know how to find where the below query is used in our database? I mean in packages/ triggers/ procedures or any where in our database
    Please find the query
    select count(sh.shipment_gid) from SHIPMENT sh, SHIPMENT_TYPE stp, LOCATION ld where (sh.shipment_gid in (select sstop.shipment_gid from SHIPMENT_STOP sstop where (sstop.appointment_delivery > trunc(TO_DATE(:1, :2), :3)) and (sstop.appointment_delivery is not null))) and (sh.is_to_be_held=:"SYS_B_0") and (sh.domain_name=:4) and (sh.insurance_policy_number like :"SYS_B_1") and (sh.perspective=:"SYS_B_2") and (sh.shipment_type_gid=stp.shipment_type_gid) and (sh.dest_location_gid=ld.location_gid(+)) and (stp.shipment_type_xid!=:5) order by ld.location_name, sh.start_time
    Regards,
    Dpk

    There is video demonstration how to import from data dictionary.
    After import you can select from the main menu: View->DDL File Editor menu item to open the DDL dialog and then click on "Generate" button on the dialog. When the DDL is generated you can search in it using "Find" button.
    Ivan

  • REP-1437: Run time error in the PL/SQL development environment (DE).

    I have a report that has always worked. Now I get the following error
    REP-0003: Warning: Unable to open global preference file.
    Starting report STCONF6 [Mon Nov 10 21:38:59 2008] ...
    REP-1437: Run time error in the PL/SQL development environment (DE).
    PDE-PSD001 Could not resolve reference to <Unknown Program Unit> while loading <Unknown> <Unknown>.
    End report STCONF6 [Mon Nov 10 21:39:10 2008].
    What is it? I DON'T know.
    Regards SILVIA

    I recall my report from a form, I get the parameter form with my parameters, then click on the traffic light to run and the error appears here
    Silvia

  • Exact fetch returns more than requested number of rows oracle error ; unable to find where exactly throwing error in the below code.

    hi i am receiving "exact fetch returns more than requested number of rows oracle error". but i am not able to locate the error in the below code. Any help would be appreciated!!!
    CREATE OR REPLACE PROCEDURE load_scene_collection_item (
    --pdname                                  VARCHAR2,
    -- LOCATION TO ADD/CHANGE below!!!
    pITEM_TYPE_ID                      INTEGER,
    pSCENE_COLLECTION_ID        INTEGER,
    pCOLLECTION_ITEM_NAME     VARCHAR2,
    pCOLLECTION_ITEM_DESC      VARCHAR2,
    pDEFAULT_COORD_X      NUMBER,
    pDEFAULT_COORD_Y      NUMBER,
    pDEFAULT_COORD_Z      NUMBER,
    pDEFAULT_WIDTH            NUMBER,
    pDEFAULT_HEIGHT            NUMBER,
    pDEFAULT_ROTATION      INTEGER,
    pDEFAULT_ALPHA            INTEGER,
    pfname                                 VARCHAR2)    IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := bfilename('BUSINESSBLOBSIMAGES', pfname);
    -- insert a NULL record to lock
    Insert into SCENE_COLLECTION_ITEM
       ( ITEM_TYPE_ID,
       SCENE_COLLECTION_ID,
       COLLECTION_ITEM_NAME,
       COLLECTION_ITEM_DESC,
        COLLECTION_ITEM_IMAGE,
       DEFAULT_COORD_X,
       DEFAULT_COORD_Y,
       DEFAULT_COORD_Z,
       DEFAULT_WIDTH,
       DEFAULT_HEIGHT,
       DEFAULT_ROTATION,
       DEFAULT_ALPHA,
        CREATE_USER,
        CREATE_DATE)
    Values    ( pITEM_TYPE_ID, pSCENE_COLLECTION_ID, pCOLLECTION_ITEM_NAME, pCOLLECTION_ITEM_DESC, EMPTY_BLOB(),   
       pDEFAULT_COORD_X,
       pDEFAULT_COORD_Y,
       pDEFAULT_COORD_Z,
       pDEFAULT_WIDTH,
       pDEFAULT_HEIGHT,
       pDEFAULT_ROTATION,
       pDEFAULT_ALPHA,  
    sys_context('USERENV', 'OS_USER'), 
    sys_extract_utc(systimestamp))
    RETURNING COLLECTION_ITEM_IMAGE INTO dst_file;
    -- LOCATIONs(2) TO ADD/CHANGE above!!!
    -- lock record
    SELECT COLLECTION_ITEM_IMAGE
    INTO dst_file
    FROM SCENE_COLLECTION_ITEM
    WHERE ITEM_TYPE_ID     = pITEM_TYPE_ID
    AND SCENE_COLLECTION_ID = pSCENE_COLLECTION_ID
    AND COLLECTION_ITEM_NAME= pCOLLECTION_ITEM_NAME
    AND COLLECTION_ITEM_DESC= pCOLLECTION_ITEM_DESC
    AND    pDEFAULT_COORD_X = DEFAULT_COORD_X
    AND   pDEFAULT_COORD_Y  = DEFAULT_COORD_Y
    AND   pDEFAULT_COORD_Z  = DEFAULT_COORD_Z
    AND   pDEFAULT_WIDTH    = DEFAULT_WIDTH
    AND   pDEFAULT_HEIGHT   = DEFAULT_HEIGHT
    AND   pDEFAULT_ROTATION = DEFAULT_ROTATION
    AND   pDEFAULT_ALPHA    = DEFAULT_ALPHA
    FOR UPDATE;
    -- LOCATION TO ADD/CHANGE above!!!
    -- open the file
    dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
    -- determine length
    lgh_file := dbms_lob.getlength(src_file);
    -- read the file
    dbms_lob.loadfromfile(dst_file, src_file, lgh_file);
    -- update the blob field
    UPDATE SCENE_COLLECTION_ITEM
    SET COLLECTION_ITEM_IMAGE = dst_file
    WHERE ITEM_TYPE_ID     = pITEM_TYPE_ID
    AND SCENE_COLLECTION_ID = pSCENE_COLLECTION_ID
    AND COLLECTION_ITEM_NAME= pCOLLECTION_ITEM_NAME
    AND COLLECTION_ITEM_DESC= pCOLLECTION_ITEM_DESC
    AND    pDEFAULT_COORD_X = DEFAULT_COORD_X
    AND   pDEFAULT_COORD_Y  = DEFAULT_COORD_Y
    AND   pDEFAULT_COORD_Z  = DEFAULT_COORD_Z
    AND   pDEFAULT_WIDTH    = DEFAULT_WIDTH
    AND   pDEFAULT_HEIGHT   = DEFAULT_HEIGHT
    AND   pDEFAULT_ROTATION = DEFAULT_ROTATION
    AND   pDEFAULT_ALPHA    = DEFAULT_ALPHA
    -- LOCATION TO ADD/CHANGE above!!!
    -- close file
    dbms_lob.fileclose(src_file);
    END load_scene_collection_item;
    Thanks in advance!!!!

    Hi PaulHorth,
    Thanks for the quick reply.
    Actually, i am getting  error while updating the records.
    below is the error message:
    Error starting at line 1 in command:
    exec load_scene_collection_item(3,15,'2 Lane 4way Stop','4 Way Stop Intersection with 2 lanes in each direction',0,0,0,400,517,0,1,'2 Lane 4way Stop.PNG');
    Error report:
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "DP_OWNER.LOAD_SCENE_COLLECTION_ITEM", line 55
    ORA-06512: at line 1
    01422. 00000 - "exact fetch returns more than requested number of rows"
    *Cause:    The number specified in exact fetch is less than the rows returned.
    *Action:   Rewrite the query or change number of rows requested

  • Error running the PL/SQL consuming web services  demo

    I downloaded and installed the PL/SQL code from:
    http://technet.oracle.com/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    on Oracle 9i version 2 (on both Windows and Solaris) which can be used to consume simple web services. However, I got the following error running the local time demo:
    select time_service.GET_LOCAL_TIME('19104') from dualORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at "XN.DEMO_SOAP", line 84
    ORA-06512: at "XN.TIME_SERVICE", line 13
    It appears to occur upon doing this:
    resp.doc.getstringval()
    It seems to mean eith resp or resp.doc is null. BTW, the following:
    select utl_http.request('www.oracle.com') from dual
    works fine, so does the web service URL. Please
    help me get this work!
    Thanks a lot!

    I downloaded and installed the PL/SQL code from:
    http://technet.oracle.com/tech/webservices/htdocs/samples/dbwebservice/DBWebServices_PLSQL.html
    on Oracle 9i version 2 (on both Windows and Solaris) which can be used to consume simple web services. However, I got the following error running the local time demo:
    select time_service.GET_LOCAL_TIME('19104') from dualORA-30625: method dispatch on NULL SELF argument is disallowed
    ORA-06512: at "XN.DEMO_SOAP", line 84
    ORA-06512: at "XN.TIME_SERVICE", line 13
    It appears to occur upon doing this:
    resp.doc.getstringval()
    It seems to mean eith resp or resp.doc is null. BTW, the following:
    select utl_http.request('www.oracle.com') from dual
    works fine, so does the web service URL. Please
    help me get this work!
    Thanks a lot!

  • Error with the PL/SQL below as  ORA-06550: line 35, column 3

    declare
       c pls_integer := 0;
       l_detail varchar2(4000);
       i pls_integer;
       l pls_integer;
       l_max_rows   integer;
    begin
    l_max_rows := nvl(:P2_ROWS,10);
    if :P2_SEARCH is null
    and :P2_LastName is null
    and :P2_FirstName is null
    and P2_Course  is null
    then
       sys.htp.p('<p>'||
           apex_escape.html('Please enter at least one search condition.')||
           '</p>');
    else
      -- PUT YOUR QUERY HERE
      for c1 in (
      select Student.Student_id, 
             Student.First_NAME, 
               Student.LAST_NAME,
             Student.Email1 as Primaryemail,
             Student.Email2 as SecondaryEmail,
             Student.Phone1 as MobileNumber, 
               Student.Phone2 as HomeNumber,
             Address.Street1 as Street ,
               Address.City as City,
               Address.State as State,
               Address.ZIP as Zip, 
               INSTITUTION.Name as InstName,
                      Course.Course_Name as Course,
      from Student Inner join Address on Student.ADDR_ID =  Address.ID
                   Inner Join Institution on Student.INST_ID = Institution.ID
                   Inner join Course on Course.INST_ID = Institution.ID
      where (   instr(upper(LAST_NAME),upper(:P2_LastName)) > 0
             or :P2_LastName is null)
      and (   instr(upper(FIRST_NAME),upper(:P2_FirstName)) > 0
           or :P2_FirsTName is null)
      and (   instr(upper(Course_Name),upper(:P2_Course)) > 0
           or :P2_Course is null) 
    and (  
           instr(upper(First_NAME),upper(:P2_SEARCH)) > 0
           or instr(upper(LAST_NAME),upper(:P2_SEARCH)) > 0
            or instr(upper(Coure_Name),upper(:P2_SEARCH)) > 0 
           or :P2_SEARCH is null
      loop
        c := c + 1;
        if c = 1 then
           sys.htp.p('<ul class="sSearchResultsReport">');
        end if;
        sys.htp.p('<li>');
        sys.htp.prn('<span class="title">');
        -- DEFINE DRILL DOWN LINK HERE
        sys.htp.prn('<a href="'
          ||apex_util.prepare_url('f?p='||:APP_ID||':3:'||:APP_SESSION||
            ':::3:P3_Student_ID:'||c1.Student_ID)||'">');
        -- ASSIGN PRIMAY ATTRIBUTE HERE, REFERENCE QUERY COLUMN
        l_detail := c1.Student_ID;
        i := instr(upper(l_detail),upper(:P2_SEARCH));
        if  i > 0 then
           l := length(:P2_SEARCH);
           l_detail := apex_escape.html(substr(l_detail,1,i-1))||
              '<span class="highlight">'||
              apex_escape.html(substr(l_detail,i,l))||'</span>'||
              apex_escape.html(substr(l_detail,i+l));
        end if;
        sys.htp.prn(l_detail);               
        sys.htp.prn('</a></span>');
        sys.htp.prn('<span class="description">');
        -- ASSIGN SECONDARY ATTRIBUTE HERE, REFERENCE QUERY COLUMN
       --  l_detail := c1._NAME;
        -- i := instr(upper(l_detail),upper(:P2_SEARCH));
         --if  i > 0 then
            --l := length(:P2_SEARCH);
            --l_detail := apex_escape.html(substr(l_detail,1,i-1))||
               --'<span class="highlight">'||
               --apex_escape.html(substr(l_detail,i,l))||'</span>'||
               --apex_escape.html(substr(l_detail,i+l));
         --end if;
         --sys.htp.prn(l_detail);
         --sys.htp.prn('</span>');
        -- DEFINE ADDITIONAL QUERY COLUMNS FOR SEARCH BELOW
        sys.htp.p('<span class="type">');
        sys.htp.prn(apex_escape.html(c1.LAST_NAME));
        sys.htp.prn('</span>');
        -- display additional column detail
        sys.htp.p('<br /><span class="type">');
        sys.htp.prn(apex_escape.html(c1.FIRST_NAME));
        sys.htp.prn('</span>');
          -- display additional column detail
        sys.htp.p('<br /><span class="type">');
        sys.htp.prn(apex_escape.html(c1.PrimaryEmail ));
        sys.htp.prn('</span>');
        --Edited by: user13133295 on Jun 3, 2013 2:55 PM

    Try formating your code using SQL Developer or Toad. If you post your code in this forum, enclose it between square brackets like this:
    &#91;code]
    Your formated code goes here...
    &#91;/code]
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Error in the pl/sql block using associative arrays

    Hi
    I tried the following block of code using associative arrays.
    DECLARE
       TYPE NumTab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
       CURSOR c1 IS SELECT empno FROM emp;
       empnos NumTab;
       rows   NATURAL := 10;
    BEGIN
       OPEN c1;
       FOR i in empnos.first..empnos.last LOOP
          /* The following statement fetches 10 rows (or less). */
          FETCH c1 BULK COLLECT INTO empnos LIMIT rows;
          EXIT WHEN c1%NOTFOUND;
          DBMS_OUTPUT.PUT_LINE ( empnos.next(i));
       END LOOP;
       CLOSE c1;
    END;and the error is
    DECLARE
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at line 8could you please let me know where i'm wrong
    and please guide me where we use these associative arrays.
    Thanks

    Something like this. Do minor modification in your code.
    DECLARE
       TYPE NumTab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
       CURSOR c1 IS SELECT empno FROM emp;
       empnos NumTab;
       rows   NATURAL := 5;
    BEGIN
       OPEN c1;
       LOOP  
        /* The following statement fetches 5 rows (or less). */
          FETCH c1 BULK COLLECT INTO empnos LIMIT rows;
          EXIT WHEN c1%NOTFOUND;
          DBMS_OUTPUT.PUT_LINE ( empnos.count);
       END LOOP;
       CLOSE c1;
    END;
    /

  • How to Convert the SQL to PL/SQL based on the Below SQL Example.

    I have an example which gives some example.
    If Actual Total Refund $ =
    But I got sum(Total Refund) = $199,999.50
    If i have total 100 rows which give the value 199,999.50 then first 50 rows i should receive an additional penny. to match the $200,000.00. and also vice versa.
    If Actual Total Refund $ = $199,999.50
    But I got sum(Total Refund) =$200,000.00
    then first 50 rows i should remove an additional penny. to match the 199,999.50 .
    I have written a quer to calculate the Sum( but not sure how to loop the amounts with adding pennies.
    SELECT LGL_ENT,JURDCN,FED_MKT_SEG,WRTN_PREM_PCTG,
    ROUND (REBT_AMT_PER_GRP,2), REBT_AMT_PER_GRP,ROUND(REBT_AMT_PER_GRP,2)- REBT_AMT_PER_GRP AS PEN_DIFF,
    SEG_CALCD_REBT, GRP_ID FROM
    SELECT PREM.LGL_ENT,PREM.JURDCN,EG.FED_MKT_SEG,SUM(PREM.WRTN_PREM_AMT) SUM_WRTN_AMT,
    (SUM(PREM.WRTN_PREM_AMT)/SPREM.WRTN_PREM_AMT) AS WRTN_PREM_PCTG,
    (SUM(PREM.WRTN_PREM_AMT)/SPREM.WRTN_PREM_AMT)*SEG.CALCD_REBT_AMT AS REBT_AMT_PER_GRP,
    SEG.CALCD_REBT_AMT AS SEG_CALCD_REBT, EG.GRP_ID
    FROM VTP.wrtn prem, wrtn_sum sprem,
    VTP.empr_size eg,
    VTP.seg seg
    WHERE
    PREM.LGL_ENT =SEG.LGL_ENT
    AND PREM.JURDCN= SEG.JURDCN
    AND EG.FED_MKT_SEG=SEG.FED_MKT_SEG
    AND PREM.LGL_ENT =SPREM.LGL_ENT
    AND PREM.JURDCN= SPREM.JURDCN
    AND EG.FED_MKT_SEG=SPREM.FED_MKT_SEG
    AND PREM.EMPR_GRP_SIZE_SKEY=EG.EMPR_GRP_SIZE_SKEY
    GROUP BY PREM.LGL_ENT, PREM.JURDCN, EG.FED_MKT_SEG, SEG.CALCD_REBT_AMT, EG.GRP_ID,SPREM.WRTN_PREM_AMT
    )ORDER BY REBT_AMT_PER_GRP ASC
    Thanks in advance for your support.

    Thanks for you Support For working with Me.
    Here is the sample Data for Actual Refund Amount is 800.00
    N GROUP     JURDCN      FED_MKT_SEG     ROUND(REBT_AMT_PER_GRP,2)     REBT_AMT_PER_GRP     Peeny Calculation      Actual Rebate That I should Match
    111 ….      MD …..      I M M ….      24.09     24.0936488     0.78          24.87
    112 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    113 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    114 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    115 ….      MD …..      I M M ….      40.57     40.5673183          0.78          41.35
    116 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    117 ….      MD …..      I M M ….      40.57     40.5673183          0.78          41.35
    118 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    119 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    120 ….      MD …..      I M M ….      16.06     16.06243253          0.78          16.84
    121 ….      MD …..      I M M ….      40.57     40.5673183          0.78          41.35
    122 ….      MD …..      I M M ….      9.2     9.198403569          0.78          9.98
    123 ….      MD …..      I M M ….      16.06     16.06243253          0.78          16.84
    124 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    125 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    126 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    127 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    128 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    129 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    130 ….      MD …..      I M M ….      40.57     40.5673183          0.78          41.35
    131 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    132 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    133 ….      MD …..      I M M ….      24.09     24.0936488          0.78          24.87
    134 ….      MD …..      I M M ….      40.57     40.5673183          0.78          41.35
    135 ….      MD …..      I M M ….      40.57     40.5673183          0.78          41.35
    136 ….      MD …..      I M M ….      24.09     24.0936488          0.77          24.86
    137 ….      MD …..      I M M ….      2.01     2.007804066          0.77          2.78
    138 ….      MD …..      I M M ….      40.57     40.5673183          0.77          41.34
    139 ….      MD …..      I M M ….      40.57     40.5673183          0.77          41.34
    Sum of Amount is                **777.42*     777.4616487          *800**
    I am Using 10G
    My Sql will only calculate the Amounts . But it will not work on Penny Calculations i should give loop logic for penny for each group untill it matches sum of Group Amuont

  • How to implement left join for the below sql.

    i need to perform left join between inventory table and purchase table and inventory table with sales table.
    please let me know the syntax.
    SELECT Tbl_ProductGroupMaster.ProdName, Tbl_ProductGroupMaster.UnitNam, Tbl_Inventory.CrDate, Tbl_Inventory.QtyOpStk, Tbl_Inventory.QtyClStk, Tbl_Inventory.ExcShortage, purchase.SumOfNUnit, sales.SumOfQty
    FROM Tbl_ProductGroupMaster, Tbl_Inventory left join
    [SELECT Tbl_PurchaseMain.idate as p_idate, Tbl_PurchaseSub.Proid as proid,
    sum(Tbl_PurchaseSub.NUnit) AS SumOfNUnit
    FROM Tbl_PurchaseMain, Tbl_PurchaseSub WHERE Tbl_PurchaseMain.GID=Tbl_PurchaseSub.gid
    and format(cdate(Tbl_PurchaseMain.idate),'mm-dd-yyyy') between format(cdate('13-Sep-2009'),'mm-dd-yyyy') and
    format(cdate('02-Oct-2009'),'mm-dd-yyyy') GROUP BY
    Tbl_PurchaseMain.idate, Tbl_PurchaseSub.Proid]. AS purchase on (Tbl_Inventory.CrDate = purchase.p_idate)
    left join
    [SELECT Tbl_SalesMain.idate AS s_idate, Tbl_SalesSub.Proid, sum(Tbl_SalesSub.Qty) AS SumOfQty
    FROM Tbl_SalesMain, Tbl_SalesSub
    WHERE Tbl_SalesMain.SAID=Tbl_SalesSub.SAID And
    format(cdate(Tbl_SalesMain.idate),'mm-dd-yyyy') Between format(cdate('13-Sep-2009'),'mm-dd-yyyy') And
    format(cdate('02-Oct-2009'),'mm-dd-yyyy')
    GROUP BY Tbl_SalesMain.idate, Tbl_SalesSub.Proid]. AS sales on (Tbl_Inventory.CrDate = sales.s_idate)
    WHERE
    Tbl_ProductGroupMaster.PROID=Tbl_Inventory.proid AND
    Tbl_Inventory.PROID=purchase.proid and
    Tbl_Inventory.PROID=sales.proid and
    Tbl_Inventory.CrDate = '13-Sep-2009';
    thanks,
    Vinodh

    Completely unstested as you haven't given much information but do you mean something like this?
    WITH purchase
           AS (  SELECT   Tbl_PurchaseMain.idate AS p_idate,
                          Tbl_PurchaseSub.Proid AS proid,
                          SUM (Tbl_PurchaseSub.NUnit) AS SumOfNUnit
                   FROM   Tbl_PurchaseMain, Tbl_PurchaseSub
                  WHERE   Tbl_PurchaseMain.GID = Tbl_PurchaseSub.gid
                          AND format (cdate (Tbl_PurchaseMain.idate), 'mm-dd-yyyy') BETWEEN format (
                                                                                               cdate('13-Sep-2009'),
                                                                                               'mm-dd-yyyy'
                                                                                        AND  format (
                                                                                                cdate('02-Oct-2009'),
                                                                                                'mm-dd-yyyy'
               GROUP BY   Tbl_PurchaseMain.idate, Tbl_PurchaseSub.Proid),
        sales
           AS (  SELECT   Tbl_SalesMain.idate AS s_idate,
                          Tbl_SalesSub.Proid,
                          SUM (Tbl_SalesSub.Qty) AS SumOfQty
                   FROM   Tbl_SalesMain, Tbl_SalesSub
                  WHERE   Tbl_SalesMain.SAID = Tbl_SalesSub.SAID
                          AND format (cdate (Tbl_SalesMain.idate), 'mm-dd-yyyy') BETWEEN format (
                                                                                            cdate('13-Sep-2009'),
                                                                                            'mm-dd-yyyy'
                                                                                     AND  format (
                                                                                             cdate('02-Oct-2009'),
                                                                                             'mm-dd-yyyy'
               GROUP BY   Tbl_SalesMain.idate, Tbl_SalesSub.Proid)
    SELECT   Tbl_ProductGroupMaster.ProdName,
             Tbl_ProductGroupMaster.UnitNam,
             Tbl_Inventory.CrDate,
             Tbl_Inventory.QtyOpStk,
             Tbl_Inventory.QtyClStk,
             Tbl_Inventory.ExcShortage,
             purchase.SumOfNUnit,
             sales.SumOfQty
    FROM   Tbl_ProductGroupMaster,
           Tbl_Inventory LEFT OUTER JOIN purchase
                         ON Tbl_Inventory.CrDate = purchase.p_idate
                         LEFT OUTER JOIN sales
                         ON Tbl_Inventory.CrDate = sales.s_idate
    WHERE Tbl_ProductGroupMaster.PROID = Tbl_Inventory.proid
    AND   Tbl_Inventory.PROID = purchase.proid
    AND   Tbl_Inventory.PROID = sales.proid
    AND   Tbl_Inventory.CrDate = '13-Sep-2009';Cheers
    Ben
    http://www.munkyben.wordpress.com

  • Syntax Error in the Query

    Dear All,
    Please tell me syntax error in the below query. When I'm going to write numeric number in this filed "$[ OVPM.DocNUm ]". It's working fine. But when I'm writing this it give me error.Please clear me where am wrong????I
    SELECT T0.[AcctNum] FROM VPM1 T0 WHERE T0.[DocNum] =$ [OVPM.DocNUm ]
    Regards
    Edited by: Anwar Ali Sohail on Sep 27, 2011 11:43 AM

    HI
    Try This
    SELECT T0.[CheckNum] FROM VPM1 T0  INNER JOIN OVPM T1 ON T0.DocNum = T1.DocEntry WHERE T0.[DocNum] = $[OVPM.DocNum]
    OR
    SELECT T0.[AcctNum] FROM VPM1 T0  INNER JOIN OVPM T1 ON T0.DocNum = T1.DocEntry WHERE T0.[DocNum] = $[OVPM.DocNum]
    Edited by: kambadasan on Sep 27, 2011 4:26 PM

  • Error in Frame Driver SQL

    the sql for the frame driver errors displaying the whole SQL and the following error messages
    *(WWV-09700)*
    ORA-01403: no data found (WWV-11230)
    LINK LOV ERROR:
    You must supply an LOV query, name, cursor, or static values.
    LOV: "%0"
    Parse Message: Cursor supplied, no need to parse.
    I have a bind variable and I dont want any LOV linked to it. I tried to give a default value and still get the same error. The sql works fine in toad and give the results.It is a union of two sqls.
    The sql returns two columns and sample result from toad is
    1st column: <!--AABBCC55-->AABBCC55: <l>Abraham Acuna< /l>
    2nd colum: portal_cust.maintain_user_dynamic_pg.show?p_arg_names=p_user_name&p_arg_values=AABBCC55
    I am using database link in the sql.
    Any idea on why is this happening?
    Thanks in advance.

    I am getting the same error even when I use a simple sql in the frame driver like
    select user_name as display_value, 'www.google.com' as returned_url from fnd_user where user_name like nvl(:p_vlaue, '%') || '%'
    please help..

  • Need help in resolving the below error - SQL statement to execute cannot be

    Here is my CO as below , which creates a callable statement.
    try {
    OAApplicationModule oaapplicationmodule = pageContext.getApplicationModule(webBean);
    OADBTransactionImpl t = (OADBTransactionImpl)oaapplicationmodule.getOADBTransaction();
    OracleCallableStatement proc = (OracleCallableStatement)t.createCallableStatement(lquery, -1);
    proc.execute();
    t.commit();
    catch(SQLException sqlexception)
    throw OAException.wrapperException(sqlexception);
    After running the page , getting the below error ... ( Please find the below error stack )
    I reffered the developement guide but did not get helpful things.
    Please provide me any clues on the same.
    Regards Raghu
    -- Error Stack ---------------------------------------------------------
    Error Page
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27123: SQL error during call statement preparation. Statement: null
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2637)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: SQL statement to execute cannot be empty or null
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleConnection.privatePrepareCall(OracleConnection.java:1138)
         at oracle.jdbc.driver.OracleConnection.prepareCall(OracleConnection.java:1054)
         at oracle.jbo.server.DBTransactionImpl.createCallableStatement(DBTransactionImpl.java:3033)
         at cisco.oracle.apps.xxchr.element.server.webui.XXCHRElementSetSearchCO.processFormRequest(XXCHRElementSetSearchCO.java:343)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.sql.SQLException: SQL statement to execute cannot be empty or null
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleConnection.privatePrepareCall(OracleConnection.java:1138)
         at oracle.jdbc.driver.OracleConnection.prepareCall(OracleConnection.java:1054)
         at oracle.jbo.server.DBTransactionImpl.createCallableStatement(DBTransactionImpl.java:3033)
         at cisco.oracle.apps.xxchr.element.server.webui.XXCHRElementSetSearchCO.processFormRequest(XXCHRElementSetSearchCO.java:343)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    Edited by: Raghu on Sep 14, 2010 2:58 AM

    check the code pasted by me again
    Connection conn = pageContext.getApplicationModule(webBean).getOADBTransaction().getJdbcConnection();
    Connection conn = oaapplicationmodule.getOADBTransaction().getJdbcConnection(); //Right oneThanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • While installing the sql server 2008 management studio I am getting the below error.So what do I do?

    Hi,
    While installing the sql server 2008 management studio I am getting the below error.
    unhandled exception has occured in your application.if you click continue,the application will ignore this error and attempt to continue.if you click quit,the aplication will close immediatly.
    An error occured creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings:Could not load file or
    assembly 'system.version=4.0.0.0. culture=neutral, publickey token=b77a5c561934e089' or one of its dependencies.the system cannot find the file supplied.
    (C:\users\harsha\appdata\local\microsoft_corporation\landingpage.exe_strongname_ryspccglaxmt4nhllj5z3thycltsvyyx\10.0.0.0\user.config
    and finally it is giving the options like continue and quit the installation.
    So what do I do?
    regards,
    harsha.

    Hello,
    Please try deleting the following sub folder to see if this will work:
      C:\users\(my profile)\AppData\Local\Microsoft_Corporation
    If you can't see AppData folder, you could use following steps to show hidden files:
     1. Open an explorer window, hit "ALT-T" choose Folder Options then go to the view tab.
     2. Turn on Show hidden files, folders or drives and
    disable Hide protected Operating System files (recommended).
    SQL Server 2008 setup fails with a Microsoft .NET Framework exception:
     http://blogs.msdn.com/b/vsnetsetup/archive/2009/10/29/sql-server-2008-setup-fails-with-a-microsoft-net-framework-exception.aspx.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • SQL Server Reporting services not starting ,when i try to start ,i am getting the below error

    System.InvalidOperationException: Cannot start service ReportServer on computer ---> System.ComponentModel.Win32Exception: The service did not respond to the start or control request in a timely fashion
       --- End of inner exception stack trace ---
       at System.ServiceProcess.ServiceController.Start(String[] args)
       at System.ServiceProcess.ServiceController.Start()
       at ReportServicesConfigUI.Panels.ServerInformationPanel.StartStopServiceTask(Boolean start)
    Services
    Could not start the SQL Server Reporting Services (MSSQLSERVER) service on Local Computer.
    Error 1053: The service did not respond to the start or control request in a timely fashion.
    OK   
    Report Server (MSSQLSERVER) cannot connectrty to sta to the report server database.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    eventid=107

    check the following link
    http://support.microsoft.com/kb/839174?wa=wsignin1.0
    http://support.microsoft.com/kb/886695
    Sharad Singh | My blogs: SharadTech | Twitter:
    @SinghSharaad | | Please remember to click “Mark as Answer” on the post that helps you.This can be beneficial to other community members reading the thread.

  • SSIS package fails with the error as given below. But its warning messages are incorrect.

    My SSIS package loads data from access database to SQL Server database.
    It's a straight copy. It fails with the below warnings and error message as shown below:
    Error messages:
    [OLE DB Source [113]] Error: There was an error with OLE DB Source.Outputs[OLE DB Source Output].Columns[RetentionID] on OLE DB Source.Outputs[OLE DB Source Output]. The column status returned was: "Text was truncated or one or more characters had no
    match in the target code page.".
    [OLE DB Source [113]] Error: The "OLE DB Source.Outputs[OLE DB Source Output].Columns[RetentionID]" failed because truncation occurred, and the truncation row disposition on "OLE DB Source.Outputs[OLE DB Source Output].Columns[RetentionID]"
    specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLE DB Source returned error code 0xC020902A.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure
    code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
    There are 3 warning messages even before I run the package. Warnings are all about the mismatch between the source and destination column sizes.
    I cross checked the source and destination column sizes. The destination column sizes are fairly high than the source column sizes.
    It worked well all the while and when we are going to pre-prod it is throwing errors. Any help is highly appreciated.
    Thank you.

    It worked well all the while and when we are going to pre-prod it is throwing errors. Any help is highly appreciated.
    Please check if the dev destination table has same column data types and size as compared with pre prod table
    Thanks, hsbal

Maybe you are looking for