ORA-06552:

Hi,
DB - 11.1.0.7.0
OS - UNIX
I got the below error in notification alert, please help.
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-905: object DASH_RDSN.OMS_ORDER_ITEM_VOIPLN_TBLF is invalid
ORA-06512: at "DASH_RDSN.MERGE_INTO_TABLE_P", line 364
ORA-06512: at "DASH_RDSN.UV_ORDER_ITEM_VOIPLN_PULL_P", line 101
Thanks.
Edited by: jiana on Sep 14, 2011 9:46 AM

jiana wrote:
Hi,
DB - 11.1.0.7.0
OS - UNIX
I got the below error in notification alert, please help.
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-905: object DASH_RDSN.OMS_ORDER_ITEM_VOIPLN_TBLF is invalid
ORA-06512: at "DASH_RDSN.MERGE_INTO_TABLE_P", line 364
ORA-06512: at "DASH_RDSN.UV_ORDER_ITEM_VOIPLN_PULL_P", line 101
Looks like something to do with the application code of yours.
Aman....

Similar Messages

  • ORA-06552 and ORA-06553 when creating a trigger

    Hey Everyone,
    I have a issue when i try and create a trigger on a view. I get this error message.
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformedThis is the Desc of the view.
    Table          Column               Data Type     Length     Nullable
    NCRCPV01     ROWID               UROWID          4000     -
              LOB_ID               VARCHAR2     1     -
              PRG_ID               VARCHAR2     1     -
              PSG_ID               VARCHAR2     1     -
              SMP_ID               VARCHAR2     4     -
              PTP_ID               VARCHAR2     1     -
              COU_ISO_ID          VARCHAR2     2     -
              PLC_DOM_INT_CD          VARCHAR2     1     -
              PLC_EFFECT_DT          DATE          7     -
              PLC_EFFECT_TO_DT     DATE          7     -
              PLC_UPDT_TD          DATE          7     -
              PLC_UPDT_USER_ID     VARCHAR2     8     -
              PLC_SOFTLOCK_TS          TIMESTAMP(6)     11     -
              PLC_LATST_COL_TM     DATE          7     nullable
              PLC_HANDRATE_IN          VARCHAR2     1     nullable
              PLC_VL_MAND_ODE_IN     VARCHAR2     1     nullableThis is the SQL of the trigger im trying to exicute.
    CREATE OR REPLACE TRIGGER "UPD_NCRCPV01_TR"
       INSTEAD OF UPDATE
       ON NCRCPV01
       REFERENCING NEW AS NEW OLD AS OLD
       FOR EACH ROW
    BEGIN
       UPDATE NCADMIN.NCRCPV01@CSAHEPA_DBAAPEX.gb.tntpost.com
          SET LOB_ID = :NEW.LOB_ID,
              PRG_ID = :NEW.PRG_ID,
              PSG_ID = :NEW.PSG_ID,
              SMP_ID = :NEW.SMP_ID,
              PTP_ID = :NEW.PTP_ID,
              COU_ISO_ID = :NEW.COU_ISO_ID,
              PLC_DOM_INT_CD = :NEW.PLC_DOM_INT_CD,
              PLC_EFFECT_DT = :NEW.PLC_EFFECT_DT,
              PLC_EFFECT_TO_DT = :NEW.PLC_EFFECT_TO_DT,
              PLC_UPDT_TD = :NEW.PLC_UPDT_TD,
              PLC_UPDT_USER_ID = :NEW.PLC_UPDT_USER_ID,
              PLC_SOFTLOCK_TS = :NEW.PLC_SOFTLOCK_TS,
              PLC_LATST_COL_TM = :NEW.PLC_LATST_COL_TM,
              PLC_HANDRATE_IN = :NEW.PLC_HANDRATE_IN,
              PLC_VL_MAND_ODE_IN = :NEW.PLC_VL_MAND_ODE_IN
        WHERE ROWID = :NEW.UROWID;
    END;I find this really strange as i have created this view and trigger in my dev environment with no issues. Now when im trying to exicute the same code in my production environment im coming up against this error. The only thing that has changed is the database link in the trigger from CSPCCPA_DBAAPEX.TNTEWW.COM to CSAHEPA_DBAAPEX.gb.tntpost.com
    I have googled the error codes and it seems that the most common error is naming a column somthing like DATE, which i have not done.
    Any help here would be appreitated :)
    Thanks,
    -N.S.N.O.

    Hello,
    And are the tables (and columns) of both tables (CSPCCPA_DBAAPEX.TNTEWW.COM and CSAHEPA_DBAAPEX.gb.tntpost.com) exactly the same?
    BTW Why don't you use (the same) synonyms for those tables. Then you don't need to change your code when you move it from dev to prod...
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Create trigger failed: ORA-06552 and ORA-06553 errors

    Hi,
    I have a couple of standard triggers looking like this:
    CREATE OR REPLACE TRIGGER "AID_xxx" BEFORE
    INSERT ON "TBLxxx" FOR EACH ROW
    begin
    select rrm_newid.nextval into :new.xxxID from dual;
    end;
    For some reason, not all of them work, but most of then do. When I try to execute it (on Oracle 8.1.7) :
    CREATE OR REPLACE TRIGGER "AID_TASK" BEFORE
    INSERT ON "TBLTASK" FOR EACH ROW
    begin
    select rrm_newid.nextval into :new.TASKID from dual;
    end;
    I get an error saying:
    The following error has occurred:
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    The table TBLTASK exists, same for the TASKID field and for the sequence.
    Any thoughts on this one?
    Regards,
    Sander

    No, you definitely do not have to do it in two steps - there is no variable needed.
    I would guess that there might be some control character hiding in your script somewhere. Although your header formatting is a bit non-standard, it compiled just fine here.
    Also, you don't need to double-quote the object names since Oracle will uppercase them anyway.

  • Ora 04052 and 06552 error in a procedure

    Hi
    i created a procedure
    CREATE OR REPLACE PROCEDURE sp_SyncStart
    AS
    BEGIN
    DELETE FROM adPerSyncLog where "date" between (trunc(sysdate-10) and (trunc(sysdate)-1);
    INSERT INTO care_admin.coventry_adPerSyncLog
    SELECT * FROM yyuniv.adPerSyncLog@UNIVERSE;
    end /
    i get the following errors
    ora -04052:error occured when looking up remote object string@string,,...
    ora 06552:pl/sql:compilation unit analysis terminated.
    help required in this.............

    My problem is closly related to this which i found in one of the forum
    This is my procedure
    CREATE OR REPLACE PROCEDURE sp_SyncStart
    AS
    BEGIN
    INSERT INTO care_admin.coventry_adPerSyncLog
    SELECT * FROM yyuniv.adPerSyncLog@UNIVERSE;
    DELETE FROM yyuniv.adPerSyncLog@UNIVERSE;
    END;
    but I get lovely errors
    PL/SQL: ORA-04052: error occurred when looking up remote object
    YYUNIV.ADPERSYNCLOG@UNIVERSE
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this
    expression is incomplete or malformed
    I tried running the insert statement directly via SQL Plus and it worked correctly. Not sure why it works interactively but not contained in a procedure.

  • Error while running package ORA-06553: PLS-553 character set name is not re

    Hi all.
    I have a problem with a package, when I run it returns me code error:
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-553: character set name is not recognized
    The full context of the problem is this:
    Previously I had a developing data base, then was migrated to a new server. After that I started to receive the error, so I began to check for the solution.
    My first move was compare the “old database” with the “new database”, so I check the nls parameters, and this was the result:
    select * from nls_database_parameters;
    Result from the old
    NLS_LANGUAGE     AMERICAN
    NLS_TERRITORY     AMERICA
    NLS_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CHARACTERSET     US7ASCII
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_SORT     BINARY
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY     $
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_RDBMS_VERSION     10.2.0.1.0
    Result from the new
    NLS_LANGUAGE     AMERICAN
    NLS_TERRITORY     AMERICA
    NLS_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CHARACTERSET     US7ASCII
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_SORT     BINARY
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY     $
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_RDBMS_VERSION     10.2.0.1.0
    As the result was identical, I decided to look for more info in the log file of the new database. What I find was this:
    Database Characterset is US7ASCII
    Threshold validation cannot be done before catproc is loaded.
    Threshold validation cannot be done before catproc is loaded.
    alter database character set INTERNAL_CONVERT WE8MSWIN1252
    Updating character set in controlfile to WE8MSWIN1252
    Synchronizing connection with database character set information
    Refreshing type attributes with new character set information
    Completed: alter database character set INTERNAL_CONVERT WE8MSWIN1252
    alter database character set US7ASCII
    ORA-12712 signalled during: alter database character set US7ASCII...
    alter database character set US7ASCII
    ORA-12712 signalled during: alter database character set US7ASCII...
    Errors in file e:\oracle\product\10.2.0\admin\orcl\udump\orcl_ora_3132.trc:
    Regards

    Ohselotl wrote:
    Hi all.
    I have a problem with a package, when I run it returns me code error:
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-553: character set name is not recognized
    The full context of the problem is this:
    Previously I had a developing data base, then was migrated to a new server. After that I started to receive the error, so I began to check for the solution.
    My first move was compare the “old database” with the “new database”, so I check the nls parameters, and this was the result:
    select * from nls_database_parameters;
    Result from the old
    NLS_LANGUAGE     AMERICAN
    NLS_TERRITORY     AMERICA
    NLS_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CHARACTERSET     US7ASCII
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_SORT     BINARY
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY     $
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_RDBMS_VERSION     10.2.0.1.0
    Result from the new
    NLS_LANGUAGE     AMERICAN
    NLS_TERRITORY     AMERICA
    NLS_CURRENCY     $
    NLS_ISO_CURRENCY     AMERICA
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CHARACTERSET     US7ASCII
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD-MON-RR
    NLS_DATE_LANGUAGE     AMERICAN
    NLS_SORT     BINARY
    NLS_TIME_FORMAT     HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT     DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT     HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY     $
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_RDBMS_VERSION     10.2.0.1.0
    As the result was identical, I decided to look for more info in the log file of the new database. What I find was this:
    Database Characterset is US7ASCII
    Threshold validation cannot be done before catproc is loaded.
    Threshold validation cannot be done before catproc is loaded.
    alter database character set INTERNAL_CONVERT WE8MSWIN1252
    Updating character set in controlfile to WE8MSWIN1252
    Synchronizing connection with database character set information
    Refreshing type attributes with new character set information
    Completed: alter database character set INTERNAL_CONVERT WE8MSWIN1252
    *********************************************************************This is an unsupported method to change the characterset of a database - it has caused the corruption of your database beyond repair. Hopefully you have a backup you can recover from. Whoever did this did not know what they were doing.
    alter database character set US7ASCII
    ORA-12712 signalled during: alter database character set US7ASCII...
    alter database character set US7ASCII
    ORA-12712 signalled during: alter database character set US7ASCII...
    Errors in file e:\oracle\product\10.2.0\admin\orcl\udump\orcl_ora_3132.trc:
    RegardsThe correct way to change the characterset of a database is documented - http://docs.oracle.com/cd/B19306_01/server.102/b14225/ch11charsetmig.htm#sthref1476
    HTH
    Srini

  • Executing query caused ora-06553

    SELECT PKG_SERVICE_REPAIRS_TIPS.FNC_PARTNO_FORMAT(PARTNO) FROM IMP_TEMP_PARTSLANG
    The above query gives me the following errors. I think it's a problem with characterset, which I crosschecke at me level, if you can let me know, how should I trouble shoot the issue, I'll be greatfull to you.
    Error starting at line 1 in command:
    SELECT PKG_SERVICE_REPAIRS_TIPS.FNC_PARTNO_FORMAT(PARTNO) FROM IMP_TEMP_PARTSLANG
    Error at Command Line:1 Column:7
    Error report:
    SQL Error: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-553: character set name is not recognized
    06552. 00000 - "PL/SQL: %s"
    *Cause:   
    *Action:
    hare krishna
    Alok

    Alok, this is expressly prohibited by everyones Metalink license.
    do you want Maran to be prosecuted for divulging Metalink info?
    Please do not force anyone into criminal acts!
    If you don't have Metalink access, you shouldn't be using Oracle.
    Sybrand Bakker
    Senior Oracle DBA

  • Characterset mismatch error while export

    Hi,
    I am getting characterset mismatch error while exporting a schema.
    select * from nls_database_parameters where parameter in('NLS_LANGUAGE','NLS_TERRITORY','NLS_CHARACTERSET')
    PARAMETER
    VALUE
    NLS_LANGUAGE
    AMERICAN
    NLS_TERRITORY
    AMERICA
    NLS_CHARACTERSET
    AL32UTF8
    i have set nls_lang on OS level
    NLS_LANG = AMERICAN_AMERICA.AL32UTF8
    C:\oracle\ora92\bin>
    C:\oracle\ora92\bin>
    C:\oracle\ora92\bin>exp hrtemp_v6/hrtemp_v6@testdb file=c:\hrtemp_v6 statistics=
    none
    Export: Release 9.2.0.1.0 - Production on Mon May 14 11:55:58 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
    server uses AL32UTF8 character set (possible charset conversion)
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user HRTEMP_V6
    . exporting PUBLIC type synonyms
    EXP-00008: ORACLE error 6552 encountered
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-553: character set name is not recognized
    EXP-00000: Export terminated unsuccessfully
    please suggest , whats wrong here
    thanks & regards

    i have set nls_lang on OS level
    NLS_LANG = AMERICAN_AMERICA.AL32UTF8How and where?
    C:\oracle\ora92\bin>At this command prompt, what do you get back from "set nls"
    You can use
    c:\> set nls_lang=.al32utf8
    ...right before you issue exp command.

  • Trigger to update field on a table with the sum of fields on another table

    My experience creating triggers and pl/sql in general can best be described in oracle terms as null. I've been practicing by creating tables and applications on my personal home server to help me with some of my work related tasks. Right now I'm trying to create a trigger that will, after insert, update, delete on the assignment_time_track table update the time_spent field on the assignments table with the sum of the time_spent fields on the assignment_time_track table. Hopefully that run on sentence there is clear to people other than myself. I've attempted to script this on my own using the trigger creation tool for Oracle Database Express Edition but I get the following error:
    Trigger create was not successful for the following reason:
    ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    Here is my attempt at creating the trigger on my own.
    create or replace trigger "ASSIGNMENT_TIME_TRACK_T1"
    AFTER
    insert or update or delete on "ASSIGNMENT_TIME_TRACK"
    for each row
    begin
    update assignments
    set time_spent = (select sum(time_spent)
    from assignment_time_track
    where assignment_time_track.name = assignments.name);
    end;
    If what I've posted isn't clear or more detail is needed, let me know and I'll respond with a complete description of both tables and my goals for each table. Thanks in advance for any help. I will also gladly accept links to tutorials or lessons that explain how to do this sort of thing.
    Edited by: bobonthenet on Mar 9, 2009 2:01 PM

    Hi,
    If the assignments table has only one row per assignment, why is the primary key the combination of name and time_spent? If you have two two assignments called "Lab Report", isn't it possible that you would spend the same amount of time on each of them? I suggest using a sequence to assign an arbitrary id number to each assignment, and use that as the primary key.
    What does each row in assuignment_time_track represent? It sounds like it is a chunk of time spent on one assignment (that is, you want to know that you spent 90 minutes on Tudesday morning working on some assignment, and that you spent another 30 minutes on Tuesday afternoon working on the same assignment). If so, then there should be a foreign key constraint in assignment_time_track referencing the primary key of assignemnt, and not the other way around.
    Alex is right; you can get the total time spent on each project in a query or view; there is no need to replicate that data.
    If you're new to Oracle and SQL, you should invest your time in getting more experience with the basics: everyday things like queries (using joins and GROUP BY) and views, and not spend much time on things that aren't used that much, like triggers.
    If you really did have to copy the data, then you could have a trigger on assignemnt_time_track that kept the total in assignment up to date, like this:
    UPDATE  assignment
    SET     total_time_spent = total_time_spent
                    + NVL (:NEW.time_spent, 0)
                             - NVL (:OLD.time_spent, 0);I suggest you name the column in assignment something different than the column in assignment_time_track, to reduce the risk of confusion. Also, since they represent different things, the same name can't be the most descripttive for each of them.
    In case you're wondering about the use of NVL, above: It allows the same statement to take care of the situation when you INSERT, UPDATE or DELETE a row in assignment_time_track. That is, if you UPDATE a row in assignment_time_track, and change the time_spent from 60 to 90, then you want to add the new time (90) and subtract the old time (60) fro the total_time_spent in assignment: that is, total_time_spent would increase by 30. If you INSERT a new row into assignment_time_track with time_spent=30, you just need to add the new time_spent (30): there is nothing to subtract. But rather than write an IF statement and a second UPDATE for that situation, you can just rely on hte fact that all :OLD values are NULL iwhen INSERTing, and treat that NULL as a 0. Likewise, when DELETing, all :NEW values are NULL..

  • Backup failure due to Character set problem

    Hi,
    I am manually running a COLD backup script in Windows NT environment and all the logs has been captured below:
    Recovery Manager: Release 8.1.6.0.0 - Production
    RMAN-06005: connected to target database: db1 (DBID=754030292)
    RMAN-06009: using target database controlfile instead of recovery catalog
    RMAN> shutdown immediate;
    2> startup mount;
    3> RUN {
    4> ALLOCATE CHANNEL disk1 TYPE disk;
    5> BACKUP DATABASE TAG 'db1_db_full' FORMAT 'e:\backup\db1\db1_backup';
    6> copy current controlfile to 'e:\backup\db1\Control_db1.ctl';
    7> }
    8>
    RMAN-06405: database closed
    RMAN-06404: database dismounted
    RMAN-06402: Oracle instance shut down
    RMAN-06193: connected to target database (not started)
    RMAN-06196: Oracle instance started
    RMAN-06199: database mounted
    Total System Global Area 934143244 bytes
    Fixed Size 70924 bytes
    Variable Size 260554752 bytes
    Database Buffers 673439744 bytes
    Redo Buffers 77824 bytes
    RMAN-03022: compiling command: allocate
    RMAN-03023: executing command: allocate
    RMAN-08030: allocated channel: disk1
    RMAN-08500: channel disk1: sid=13 devtype=DISK
    RMAN-03022: compiling command: backup
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure during compilation of command
    RMAN-03013: command type: backup
    RMAN-06003: ORACLE error from target database: ORA-06550: line 1, column 166:
    PLS-00553: character set name is not recognized
    ORA-06550: line 0, column 0:
    PL/SQL: Compilation unit analysis terminated
    RMAN-06031: could not translate database keyword
    Recovery Manager complete.
    As the above log shown, I cannot do any backup command in the RUN bracket and it complains that the character set is not recognized.
    This set of error happens when I have create six other Oracle databases in my NT box. Before that, I can manually run the backup with no problem and a backupset has been generated.
    If you have come across this problem and have solutions of it. That will be great.
    Thanks !!
    null

    kk001 wrote:
    Hi ,
    The export Backup failing due to character set problem
    . . exporting table ravidlx
    EXP-00008: ORACLE error 6552 encountered
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-553: character set name is not recognized
    P
    Please suggest how to set character set
    I don't know what you have.
    I don't know what you do.
    I don't know what you see.
    It is really, Really, REALLY difficult to fix a problem that can not be seen.
    use COPY & PASTE so we can see what you do & how Oracle responds.
    do as below so we can know complete Oracle version & OS name.
    Post via COPY & PASTE complete results of
    SELECT * from v$version;

  • Cannot enter data into table with column named DATE

    I have a table as follows:
    CREATE TABLE PACKINGLINE (
    SNO VARCHAR2(13),
    "DATE" DATE DEFAULT SYSDATE,
    PRDORDNO VARCHAR2(12),
    NOW DATE DEFAULT SYSDATE,
    CONSTRAINT PACKINGLINE_PK PRIMARY KEY ("SNO", "DATE"));
    Note the "cleaverly" named DATE and NOW columns (yes, that is the name of the column... our company was bessed with a very clear SQL server DBA in the past)
    This SQL statement works:
    INSERT INTO PACKINGLINE (SNO, PRDORDNO) VALUES ('1000808972', '100080897');
    However when I try use SQL Developer as follows I cannot enter data:
    1. Open SQL Developer
    2. Click on "Tables" then on my table named PACKINGLINE
    3. Click the "Data" tab
    4. Click the [+] "Insert Row" Icon
    5. Enter the same data as above
    6. Click Commit
    7. The following error is shown in the log window and I cannot commit the data change.
    Error message
    ==================
    INSERT INTO "DBO"."PACKINGLINE" (SNO, PRDORDNO) VALUES ('1000808971', '100080897')
    One error saving changes to table "DBO"."PACKINGLINE":
    Row 5: ORA-06550: Row 1、Column 25:
    PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: Row 1、Column 7:
    PL/SQL: SQL Statement ignored
    ==================
    I can copy and paste the above query into a normal SQL statement window and the data commits fine.

    Its so flaky there really must be something wrong Mr Adobe support person....
    If I load a PDF, do nothing, gently save it, reopen and then waiting for my trial dialogue to wake up so that I can click on continue trial... then save as extended reader blah.... then close. I have finally saved one that works!!!! but how difficult is that????
    WHAT IS WRONG ADOBE??

  • Cursor Declaration

    I am trying to declare a cursor in a stored procedure using the following sql:
         CURSOR conversionCursor is select customer_number, company_id , buyer_id
         from hpsiuser.conversion_master natural join
         (select distinct mfg_code, customer_number
                                                 from hpsiuser.vendor_info, invoice_h
                                                 where vendor_id = vendorID);
    I get the following errors:
    Line # = 6 Column # = 29 Error Text = PL/SQL: SQL Statement ignored
    Line # = 6 Column # = 9 Error Text = PLS-00341: declaration of cursor 'CONVERSIONCURSOR' is incomplete or malformed
    Line # = 7 Column # = 43 Error Text = PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    My assumption is that it is having a problem with the join yet it works as a stand alone select statement.
    Any insight would be appreciated.
    Jon King

    CURSOR Expressions
    A CURSOR expression returns a nested cursor. This form of expression is equivalent to the PL/SQL REF CURSOR and can be passed as a REF CURSOR argument to a function.
    cursor_expression::=
    Text description of cursor_expression
    A nested cursor is implicitly opened when the cursor expression is evaluated. For example, if the cursor expression appears in a SELECT list, a nested cursor will be opened for each row fetched by the query. The nested cursor is closed only when:
    The nested cursor is explicitly closed by the user
    The parent cursor is reexecuted
    The parent cursor is closed
    The parent cursor is cancelled
    An error arises during fetch on one of its parent cursors (it is closed as part of the clean-up)
    Restrictions on CURSOR Expressions
    If the enclosing statement is not a SELECT statement, nested cursors can appear only as REF CURSOR arguments of a procedure.
    If the enclosing statement is a SELECT statement, nested cursors can also appear in the outermost SELECT list of the query specification, or in the outermost SELECT list of another nested cursor.
    Nested cursors cannot appear in views.
    You cannot perform BIND and EXECUTE operations on nested cursors.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/expressions6a.htm#1035109
    Joel P�rez

  • Open Cursor in a procedure

    Hi to all,
    my problem is to open a cursor into a procedure.
    The code is the following:
    PROCEDURE p_selection_customer
    IS
         CURSOR cursor_customer IS
              SELECT
              c_u.id_customer
              FROM
              customer_unified_a c_u;
         BEGIN
              FOR record_customer IN cursor_customer LOOP
                   ROLLBACK;
              END LOOP;
    END p_selection_customer;
    The error is :
    Errore(55,3): PL/SQL: SQL Statement ignored
    Errore(58,3): PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    This procedure is defined in the spec. Then I suppose that my problem is that I can't open a cursor into my schema. Do I verify this hypotesys in my schema? Do I have some queries? My schema don't have the dba and sys grants.
    Thank'you very match!

    Hi Alex,
    this is the complete script used to generate the table.
    Me too, I knew that the partition was transparent to the Cursor statement.
    Thank'you very match!
    CREATE TABLE "SSVILCID"."TW_E_CUSTOMER_UNIFIED_A"
       (     "ID_CUSTOMER_UNIFIED" VARCHAR2(27 BYTE) NOT NULL ENABLE,
         "START_VALIDITY_DATE" DATE NOT NULL ENABLE,
         "START_ASINC_DATE" DATE NOT NULL ENABLE,
         "END_ASINC_DATE" DATE,
         "CUSTOMER_STATUS" VARCHAR2(255 BYTE),
         "TERMINATION_DATE" DATE,
         "CUSTOMER_DOMAIN" VARCHAR2(255 BYTE),
         "CUSTOMER_CLUSTER" VARCHAR2(255 BYTE),
         "CUSTOMER_SENIORITY" DATE,
         "ACTIVATION_DATE" DATE,
         "ACQUISITION_DATE" DATE,
         "ACQUISITION_CHANNEL" VARCHAR2(255 BYTE),
         "SUB_ACQUISITION_CHANNEL" VARCHAR2(255 BYTE),
          CONSTRAINT "TW_E_CUSTOMER_UNIFIED_A_PK" PRIMARY KEY ("START_ASINC_DATE", "ID_CUSTOMER_UNIFIED", "START_VALIDITY_DATE")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSTEM"  ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
      PARTITION BY RANGE ("START_ASINC_DATE")
      SUBPARTITION BY LIST ("END_ASINC_DATE")
    (PARTITION "M200909"  VALUES LESS THAN (TO_DATE(' 2009-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M200909_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M200909_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M200910"  VALUES LESS THAN (TO_DATE(' 2009-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M200910_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M200910_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M200911"  VALUES LESS THAN (TO_DATE(' 2009-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M200911_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M200911_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M200912"  VALUES LESS THAN (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M200912_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M200912_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M201001"  VALUES LESS THAN (TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M201001_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M201001_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M201002"  VALUES LESS THAN (TO_DATE(' 2010-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M201002_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M201002_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "FUTURE"  VALUES LESS THAN (MAXVALUE)
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M210001_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M210001_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") )  ENABLE ROW MOVEMENT ;

  • How to compare a boolean value returned from a function in a sql query

    Hi all
    i have a function which return boolean true or false.
    mean while i am writing a sql query which should check this function and will return a result set only when it is true. how will i use a function which returns boolean in a sql query..
    thanks in advance'
    Hari

    I don't think this is possible - i'm not sure. Can you post your function script? The reason why am i asking this is --
    satyaki>set serveroutput on
    satyaki>
    satyaki>
    satyaki>
    satyaki>create or replace function test_satf(emno in number)
      2  return boolean
      3  is
      4    v_cnt   number(5);
      5    v_flg   boolean;
      6  begin
      7    select count(*)
      8    into v_cnt
      9    from emp
    10    where empno = emno;
    11   
    12    if v_cnt = 1 then
    13       v_flg := TRUE;
    14    else
    15       v_flg := FALSE;
    16    end if;
    17   
    18    return v_flg;
    19  exception
    20    when others then
    21      v_flg := FALSE;
    22   return v_flg;
    23  end;
    24  /
    Function created.
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>desc emp;
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    satyaki>
    satyaki>
    satyaki>
    satyaki>select count(*) from emp;
      COUNT(*)
            14
    satyaki>
    satyaki>select empno,test_satf(empno)
      2  from emp;
    select empno,test_satf(empno)
    ERROR at line 1:
    ORA-06552: PL/SQL: Statement ignored
    ORA-06553: PLS-382: expression is of wrong type
    satyaki>select to_char(test_satf(empno))
      2  from emp;
    select to_char(test_satf(empno))
    ERROR at line 1:
    ORA-06552: PL/SQL: Statement ignored
    ORA-06553: PLS-382: expression is of wrong type
    satyaki>
    satyaki>create or replace function test_satf(emno in number)
      2  return varchar2
      3  is
      4    v_cnt   number(5);
      5    v_flg   varchar2(10);
      6  begin
      7    select count(*)
      8    into v_cnt
      9    from emp
    10    where empno = emno;
    11   
    12    if v_cnt = 1 then
    13       v_flg := 'TRUE';
    14    else
    15       v_flg := 'FALSE';
    16    end if;
    17   
    18    return v_flg;
    19  exception
    20    when others then
    21      v_flg := 'FALSE';
    22   return v_flg;
    23  end;
    24  /
    Function created.
    satyaki>
    satyaki>
    satyaki>select test_satf(empno)
      2  from emp;
    TEST_SATF(EMPNO)
    TRUE
    TRUE
    TRUE
    TRUE
    TRUE
    TRUE
    TRUE
    TRUE
    TRUE
    TRUE
    TRUE
    TEST_SATF(EMPNO)
    TRUE
    TRUE
    TRUE
    14 rows selected.Or, may be i'm missing something.
    Regards.
    Satyaki De.

  • Invalid variable declaration:  object 'TIMESTAMP' must be a type or subtype

    Message 1: ORA-06550: line 91, column 14:
    PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-488: invalid variable declaration: object 'TIMESTAMP' must be a type or subtype
    ORA-06550: line 89, column 1:
    PL/SQL: SQL Statement ignored
    I'm getting above error message when i'm trying to define one cursor from a table which has a column with data timestamp(3) in a cursor i'm not even using a column with data type timestamp .( this tables i created by importing sybase tables into oracle )
    SELECT to_char(sysdate) -- trunc(act.date_posted)
    INTO v__Data
    from cedb.cr_ar_debit_activity act
    where rownum < 2 ;
    for testing purpose i even removed the cursor and make it shor to above query then also it dosent work and gave the above error . if you know the solution then please let me know . i think i've to do/change database settings but i'm not sure .

    the above code is not working but the following code is working if i open cursor from assiging select to variable , why this is happening .
    DECLARE
         v_A_REPORT_DT VARCHAR2(100);
    ls_sel VARCHAR2(900);
    i INTEGER := 1;
    TYPE dynamic_cur IS REF CURSOR;
    tb_test_cur dynamic_cur ;
    TYPE array_date_type IS TABLE OF DATE INDEX BY PLS_INTEGER;
    v1 array_date_type ;
    BEGIN
         v_A_REPORT_DT := '01-01-2007'/* VARCHAR2(2000) */;
    -- this one is not working
    SELECT to_char(sysdate) -- trunc(act.date_posted)
    INTO v_A_REPORT_DT
    from cedb.cr_ar_debit_activity act
    where rownum < 2 ;
    ls_sel := 'SELECT trunc(act.date_posted)
    from cedb.cr_ar_debit_activity act
    where rownum < 3 ' ;
    OPEN tb_test_cur FOR ls_sel;
    LOOP
    FETCH tb_test_cur INTO v1(i) ;
    EXIT WHEN tb_test_cur%notfound;
    dbms_output.put_line(to_char(v1(i)));
    i := i + 1 ;
    END LOOP;
    CLOSE tb_test_cur;
    END;

  • Different Result for SQL and PL/SQL query..need a bit of help

    If i just run:
    SELECT COUNT(*) from DB where (CLOSE_TIME-OPEN_TIME<5) and (CLOSE_TIME-OPEN_TIME>=1) and OPEN_TIME>'1/1/2011';
    It works great.
    If I run
    BEGIN
    SELECT COUNT(*) from DB where (CLOSE_TIME-OPEN_TIME<5) and (CLOSE_TIME-OPEN_TIME>=1) and OPEN_TIME>'1/1/2011';
    END
    I get the following error.
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 3
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-488: invalid variable declaration: object 'NUMBER' must be a type or subtype
    ORA-02063: preceding 2 lines from SMGLINK

    Hi,
    Whenever you have a problem, post a complete test script that people can run to re-create the problem and test their ideas. Include CREATE TABLE and INSERT statements for any or your own tables needed.
    Post the results you want from that sample data.
    Always say which version of Oracle you're using.
    bostonmacosx wrote:
    If i just run:
    SELECT COUNT(*) from DB where (CLOSE_TIME-OPEN_TIME<5) and (CLOSE_TIME-OPEN_TIME>=1) and OPEN_TIME>'1/1/2011';If OPEN_TIME is a DATE, then don't try to compare it to a string, such as '1/1/2011'. (This is not related to the present problem, only a future one.)
    It works great.
    If I run
    BEGIN
    SELECT COUNT(*) from DB where (CLOSE_TIME-OPEN_TIME<5) and (CLOSE_TIME-OPEN_TIME>=1) and OPEN_TIME>'1/1/2011';
    END
    I get the following error.
    ORA-04052: error occurred when looking up remote object [email protected]
    ORA-00604: error occurred at recursive SQL level 3
    ORA-06552: PL/SQL: Compilation unit analysis terminated
    ORA-06553: PLS-488: invalid variable declaration: object 'NUMBER' must be a type or subtype
    ORA-02063: preceding 2 lines from SMGLINKI would expect a different error "PLS_00428: an INTO clause is expected".

Maybe you are looking for