Error loading Cache group but Cache group created with out error

Hi
I have created a cache group but when I load that cache group I get following error:
Command> load cache group SecondCache commit every 1 rows;
5056: The cache operation fails: error_type=<Oracle Error>, error_code=<972>, error_message:ORA-00972: identifier is too long
5037: An error occurred while load TESTUSER.SECONDCACHE:Load failed (ORA-00972: identifier too long)
The command failed.
Please help.
Looking forward for your reply.
/Ahmad

Hi Chris!
Thanks for urgent response. I solved my problem to some extent but want to share.
Acctualy I was having a column named # which is a primary key also. When I change that column name from # to some other name like some characters then the cahe group is loaded successfuly.
Is there anyway in TimesTen to load columns names # .
I read in the documentation of TimesTen that it allows columns names as # , so it is the reason it is creating the cache group but fails to load do not know the reason.
The code for creating cache group is as follows:
create cache group MEASCache from testuser."MEAS"("UPDATED" number not
null,"UNOCCUPIEDRECORD" number not null,"VALUECURRENT" number not null,"EQSFREF
" number not null,"IMPLEMENTED" number not null,"FORMAT" number not null,"#" number not null,primary key("#"))
When I change the # column to like eg Identity it works fine.
/Ahmad

Similar Messages

  • RMAN-06444 dbms_rcvman package body created with compliation errors

    I am trying to install Recovery manager but I get the above error message "RMAN-06444 dbms_rcvman package body created with compliation errors" and "RMAN-06433 error installing recovery cataolog"
    Can someone tell me what I did wrong?

    My Oracle version is 8i.
    I started from scratch again and was able to create a catalog, create a user(RMAN) with sysdba privleges.
    But when I try to connect to the target I get insufficient privleges.???
    I tried these methods and still have insufficient privleges.
    rman target / catalog rman/rman@rcat
    rman target system/manager@jem03 catalog rman/rman@rcat
    RMAN> connect target
    What am I doing wrong?
    Thanks for responding by the way.
    James

  • Warning: Procedure created with compilation errors.

    I am trying to upload a pdf file into a blob column of a table. I get this error with these three ways of doing that:Warning: Procedure created with compilation errors.
    Any ideas why?
    -- THE STORAGE TABLE FOR THE IMAGE FILE
    ALTER TABLE PDM
    DROP PRIMARY KEY CASCADE;
    DROP TABLE PDM CASCADE CONSTRAINTS;
    CREATE TABLE PDM (
    DNAME VARCHAR2(30), -- DIRECTORY NAME
    SNAME VARCHAR2(30), -- SUBDIRECTORY NAME
    FNAME VARCHAR2(30), -- FILE NAME
    IBLOB BLOB); -- IMAGE FILE
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE (
    PDNAME VARCHAR2,
    PSNAME VARCHAR2,
    PFNAME VARCHAR2) IS
    SRC_FILE BFILE;
    DST_FILE BLOB;
    LGH_FILE BINARY_INTEGER;
    BEGIN
    SRC_FILE := BFILENAME('PDF_DIR', '266-5210.pdf');
    -- INSERT A NULL RECORD TO LOCK
    INSERT INTO PDM
    (DNAME, SNAME, FNAME, IBLOB)
    VALUES
    (PDNAME, PSNAME, PFNAME, EMPTY_BLOB())
    RETURNING IBLOB INTO DST_FILE;
    -- LOCK RECORD
    SELECT IBLOB
    INTO DST_FILE
    FROM PDM
    WHERE DNAME = PDNAME
    AND SNAME = PSNAME
    AND FNAME = PFNAME
    FOR UPDATE;
    -- OPEN THE FILE
    DBMS_LOB.FILEOPEN(SRC_FILE, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.OPEN(DST_FILE, DBMS_LOB.LOB_READWRITE);
    -- 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 PDM
    SET IBLOB = DST_FILE
    WHERE DNAME = PDNAME
    AND SNAME = PSNAME
    AND FNAME = PFNAME;
    -- CLOSE FILE
    DBMS_LOB.FILECLOSE(SRC_FILE);
    END LOAD_FILE;
    -- THE STORAGE TABLE FOR THE IMAGE FILE
    ALTER TABLE PDM
    DROP PRIMARY KEY CASCADE;
    DROP TABLE PDM CASCADE CONSTRAINTS;
    CREATE TABLE PDM
    FNAME VARCHAR2(1000)
    ,IBLOB BLOB
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE AS (
    SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
    DST_FILE BLOB;
    BEGIN
    -- INSERT A NULL RECORD TO LOCK
    INSERT INTO PDM
    (FNAME, IBLOB)
    VALUES
    ('262-2827.pdf', EMPTY_BLOB())
    RETURNING IBLOB INTO DST_FILE;
    -- OPEN THE FILE
    DBMS_LOB.FILEOPEN(SRC_FILE, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.OPEN(DST_FILE, DBMS_LOB.LOB_READWRITE);
    -- READ THE FILE
    DBMS_LOB.LOADFROMFILE( SRC_FILE, DST_FILE);
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET FNAME = SRC_FILE,
    IBLOB = DST_FILE;
    -- CLOSE FILE
    DBMS_LOB.CLOSE(DST_FILE);
    DBMS_LOB.FILECLOSE(SRC_FILE);
    COMMIT;
    END LOAD_FILE;
    ALTER TABLE IMAGE_TABLE
    DROP PRIMARY KEY CASCADE;
    DROP TABLE IMAGE_TABLE CASCADE CONSTRAINTS;
    CREATE TABLE IMAGE_TABLE (
    ID NUMBER PRIMARY KEY,
    IMAGE ORDSYS.ORDIMAGE);
    CREATE OR REPLACE DIRECTORY IMAGEDIR AS 'C:\cards\';
    GRANT READ ON DIRECTORY IMAGEDIR TO PUBLIC;
    GRANT READ ON DIRECTORY MY_FILES TO twilliam;
    GRANT READ ON DIRECTORY MY_FILES TO tmwillia;
    CREATE OR REPLACE PROCEDURE IMAGE_IMPORT(DEST_ID NUMBER,
    FILENAME VARCHAR2)
    IS
    IMG ORDSYS.ORDIMAGE;
    CTX RAW(64) := NULL;
    BEGIN
    DELETE FROM IMAGE_TABLE
    WHERE ID = DEST_ID;
    INSERT INTO IMAGE_TABLE (ID, IMAGE)
    VALUES (DEST_ID, ORDSYS.ORDIMAGE.INIT())
    RETURNING IMAGE INTO IMG;
    IMG.IMPORTFROM(CTX, 'FILE', 'IMAGEDIR', FILENAME);
    UPDATE IMAGE_TABLE SET IMAGE=IMG WHERE ID=DEST_ID;
    END
    CALL IMAGE_IMPORT(7142,'125-0502.pdf');
    CALL IMAGE_IMPORT(7143,'125-0503.pdf');
    SELECT ID,
    T.IMAGE.GETHEIGHT(),
    T.IMAGE.GETWIDTH()
    FROM IMAGE_TABLE T;
    SELECT ID,
    T.IMAGE.GETFILEFORMAT(),
    T.IMAGE.GETCOMPRESSIONFORMAT()
    FROM IMAGE_TABLE T;
    SELECT ID,
    T.IMAGE.GETCONTENTFORMAT(),
    T.IMAGE.GETCONTENTLENGTH()
    FROM IMAGE_TABLE T;

    In the second load_file procedure you should probably change the update command
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET FNAME = SRC_FILE,
    IBLOB = DST_FILE;into this
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET IBLOB = DST_FILE
    WHERE  FNAME = '262-2827.pdf';but I'm not sure how to explain the eof error message. Usually this happens when you forget an "END;" or "END LOOP;" command.
    Ok I rechecked and the declaration of the second procedure seems wrong
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE AS (
    SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
    DST_FILE BLOB;
    BEGINshould be rewritten as
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE
      AS
      SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
      DST_FILE BLOB;
    BEGIN
    ...I removed one parenthesis which was not closed.
    And for the image_import procedure there is a semikolon missing after the final END.
    END*;*
    Edited by: Sven W. on Nov 24, 2008 5:54 PM.
    Edited by: Sven W. on Nov 24, 2008 5:56 PM
    Edited by: Sven W. on Nov 24, 2008 5:59 PM

  • Simple Java created with compilation errors.

    Hi,
    While I am using Oracle for many years (currently 9.2.0.6.0) I am completely new to Java in the database.
    I found a very simple example to get started (please see SQL*Plus dump below) ... but I get a compilation error. Can anyone tell what I am doing wrong?
    SQL> CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED Fibonacci AS
    2 public class Fibonacci
    3 {
    4 public static int fib (int n)
    5 {
    6 if (n == 1 || n == 2)
    7 return 1;
    8 else
    9 return fib(n - 1) + fib(n - 2);
    10 }
    11 }
    12 /
    Warning: Java created with compilation errors.
    SQL> show errors java source Fibonacci
    No errors.
    SQL>
    (It must be a simple thing, the example I found seems correct, but what about grants, settings etc.)
    Thanks in advance,
    Stefan

    Stefan,
    I cannot see anything in your code that would cause a compilation error. However, according to the example in the "Oracle 9i SQL Reference", it looks like you need to enclose the name in double quotes, as in:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Fibonacci" AS ...Alternatively (and this is the way I do it), you could compile the class outside of the database, and load the compiled class file. Just create a file called "Fibonacci.java" (that contains your java code), compile it, and then use the "loadjava" tool to load the "Fibonacci.class" file into the database. Please refer to the Oracle 9i Java Developer's Guide for more details.
    Good Luck,
    Avi.

  • Loading of 'SEOCOMPODF' import package is interrupted with R3load error.

    Dear SAP Colleagues,
    Please advice with the following, we try to install SAP ERP  6.0 support release 3 on windows 2008 server with oracle database 10g 10.2.0.4.0,
    The error is occurred in Import ABAP phase as follow,
    ERROR 2010-10-14 12:10:00.729
    CJS-30022  Program 'Migration Monitor' exits with error code 103. For details see log file(s) import_monitor.java.log, import_monitor.log.
    Hint : I already applied this scenario of installation in two other server with same hardware and sap software and itu2019s already up and running,
    From my side I applied the following but nothing is changed, 
    u2022     Applied sap Note 709389
    u2022     Replaced the sap source more times,
    u2022     Maintained the paging file,
    u2022     Restart the sap server
    u2022     Restart the installation from scratch
    Also I can see that the oracle service and listener is started automatically
    I checked the log files mentioned above as follow,
    Contents in log file u201Cimport_monitor.javau201D
    java version "1.4.2_17"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_17-b06)
    Java HotSpot(TM) Client VM (build 1.4.2_17-b06, mixed mode)
    Import Monitor jobs: running 1, waiting 4, completed 23, failed 0, total 28.
    Import Monitor jobs: running 2, waiting 3, completed 23, failed 0, total 28.
    Import Monitor jobs: running 3, waiting 2, completed 23, failed 0, total 28.
    Loading of 'SEOCOMPODF' import package: ERROR
    Loading of 'DD03L' import package: ERROR
    Import Monitor jobs: running 0, waiting 2, completed 23, failed 3, total 28.
    Loading of 'FUPARAREF' import package: ERROR
    Import Monitor jobs: running 0, waiting 2, completed 23, failed 3, total 28.
    Import Monitor jobs: running 0, waiting 2, completed 23, failed 3, total 28.
    Import Monitor jobs: running 1, waiting 1, completed 23, failed 3, total 28.
    Loading of 'TODIR' import package: ERROR
    Import Monitor jobs: running 0, waiting 1, completed 23, failed 4, total 28.
    Contents in log file u201Cimport_monitoru201D
    ERROR: 2010-10-14 12:09:04 com.sap.inst.migmon.LoadTask run
    Loading of 'SEOCOMPODF' import package is interrupted with R3load error.
    Process 'D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe -i SEOCOMPODF.cmd -dbcodepage 4103 -l SEOCOMPODF.log -stop_on_error' exited with return code 2.
    For mode details see 'SEOCOMPODF.log' file.
    Standard error output:
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    ERROR: 2010-10-14 12:09:04 com.sap.inst.migmon.LoadTask run
    Loading of 'DD03L' import package is interrupted with R3load error.
    Process 'D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe -i DD03L.cmd -dbcodepage 4103 -l DD03L.log -stop_on_error' exited with return code 2.
    For mode details see 'DD03L.log' file.
    Standard error output:
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    ERROR: 2010-10-14 12:09:04 com.sap.inst.migmon.LoadTask run
    Loading of 'FUPARAREF' import package is interrupted with R3load error.
    Process 'D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe -i FUPARAREF.cmd -dbcodepage 4103 -l FUPARAREF.log -stop_on_error' exited with return code 2.
    For mode details see 'FUPARAREF.log' file.
    Standard error output:
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    TRACE: 2010-10-14 12:09:30 com.sap.inst.migmon.LoadTask run
    Loading of 'TODIR' import package is started.
    TRACE: 2010-10-14 12:09:30 com.sap.inst.migmon.LoadTask processPackage
    Loading of 'TODIR' import package into database:
    D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe -i TODIR.cmd -dbcodepage 4103 -l TODIR.log -stop_on_error
    ERROR: 2010-10-14 12:09:30 com.sap.inst.migmon.LoadTask run
    Loading of 'TODIR' import package is interrupted with R3load error.
    Process 'D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe -i TODIR.cmd -dbcodepage 4103 -l TODIR.log -stop_on_error' exited with return code 2.
    For mode details see 'TODIR.log' file.
    Standard error output:
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    WARNING: 2010-10-14 12:10:00
    Cannot start import of packages with views because not all import packages with tables are loaded successfully.
    WARNING: 2010-10-14 12:10:00
    4 error(s) during processing of packages.
    INFO: 2010-10-14 12:10:00
    Import Monitor is stopped.
    Regards,
    Ahmed Saber

    Hi Gagan Deep Kaushal,
    The todir.log file it was so big so I backup it run the installation again to regenerate the log file, please find below the log file you requested,
    D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe: START OF LOG: 20101014135456
    D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe: sccsid @(#) $Id: //bas/700_REL/src/R3ld/R3load/R3ldmain.c#14 $ SAP
    D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe: version R7.00/V1.4 [UNICODE]
    Compiled Jan 24 2008 01:41:44
    D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe -i TODIR.cmd -dbcodepage 4103 -l TODIR.log -stop_on_error
    DbSl Trace: OCI-call 'OCISessionBegin' failed with rc=1034
    DbSl Trace: CONNECT failed with sql error '1034'
    DbSl Trace: OCI-call 'OCISessionBegin' failed with rc=1034
    DbSl Trace: CONNECT failed with sql error '1034'
    (DB) ERROR: db_connect rc = 256
    DbSl Trace: OCI-call 'OCISessionBegin' failed with rc=1034
    DbSl Trace: CONNECT failed with sql error '1034'
    DbSl Trace: OCI-call 'OCISessionBegin' failed with rc=1034
    DbSl Trace: CONNECT failed with sql error '1034'
    (DB) ERROR: DbSlErrorMsg rc = 99
    D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe: job finished with 1 error(s)
    D:\usr\sap\ECP\SYS\exe\uc\NTAMD64\R3load.exe: END OF LOG: 20101014135457
    Regards,
    Ahmed Saber

  • Procedure created with compilation errors

    I created a procedure and that when I run it in SQLPlus I get this message:
    Warning: Procedure created with compilation errors.
    Where can I go to see what the errors are?

    I tried adding 'show errors' to the end of the procedure but it didn't display any errors. I'm using this script that is for MS SQL and I wanted to see what I would need to change in order for it to work in Oracle:
    Can you tell me where I should put the 'show errors' statmement?
    DROP PROCEDURE      scp_mig_jobs_copy;
    CREATE PROCEDURE scp_mig_jobs_copy
    AS
    ** File Name:
    ** scp_mig_jobs_copy.sql
    ** Procedure Name:
    ** scp_mig_jobs_copy
    ** Description:
    ** This procedure is used to move data from the limited staging table,
    **          scp_mig_jobs, to the full migration table scp_mig_jobs2
    **          It first trunacates the migration table, then copies the data
    ** Saba Version:
    ** SE2005 May release + August patch.
    ** Input Parameter(s):
    **          None
    ** Output Parameter(s):
    ** None
    ** Return Codes:
    **          None.
    ** Error Codes:
    ** None.
    ** Calling Procedure(s):
    ** Procedures Called:
    **          None.
    ** Database Table(s) Accessed:
    **          sct_mig_jobs
    **          sct_mig_jobs2
    ** Database View(s) Accessed:
    **          None.
    ** Cursor(s):
    **          None.
    ** Misc:
    BEGIN
    DECLARE @xerror     NUMBER;
    PRINT '**************************************************';
    PRINT 'Begin Copying data from the staging table, sct_mig_jobs, to the migration table, sct_mig_jobs2';
    PRINT getDate();
    PRINT ' '
    BEGIN TRAN
    TRUNCATE TABLE sct_mig_jobs2
    INSERT INTO sct_mig_jobs2 (
    name, description, custom0, custom1, --These are the only fields that the staging table has
    id, CI_Name
    created_by, created_on,
    updated_by, updated_on,
    split,
    custom2, custom3, custom4, custom5, custom6, custom7, custom8, custom9,
    process_ind, process_date, valid_rec_ind, rec_status, err_num, err_msg
    SELECT name, description, custom0, custom1, --These are the only fields that the staging table has
    NULL id,
         NULL CI_Name,
    NULL created_by, NULL created_on,
    NULL updated_by, NULL updated_on,
    NULL split,
    NULL custom2, NULL custom3, NULL custom4, NULL custom5, NULL custom6, NULL custom7, NULL custom8, NULL custom9,
    NULL process_ind, NULL process_date, NULL valid_rec_ind, NULL rec_status, NULL err_num, NULL err_msg
    FROM sct_mig_jobs
    SET @xerror = @@error;
    IF(@xerror<>0)
    BEGIN
    ROLLBACK TRAN;
    PRINT 'Error:: ' + STR(@xerror);
    PRINT '--Unable to copy data from the staging table to the migration table';
    END
    ELSE
    BEGIN
    COMMIT TRAN;
    PRINT 'Data successfully copied from the staging table to the migration table';
    END
    PRINT ' ';
    PRINT ' ';
    END
    /

  • Partition my HD with Lion but it comes up with an error"

    I'm trying to partition my HD with Lion but it comes up with an error" couldn't modify partition map because file system verification failed.
    i have verified permissions and repair them all check out good. Any ideas?

    Ok try this.
    Get a copy of your users file data folders (Music, Docs etc) off the machine onto a storage drive and disconnect it.
    Do this in addtition to TimeMachine or clone backups, you need to have two copies and TM drives are not quite as easily accesible and can get corrupted.
    1: Boot into Recovery HD (hold command and r keys down) and use Disk Utility to First Aid >Repair the drive, see if that works if it can't repair the drive, you have a more serious issue. If it does repair the drive, do it again until nothing is repaired.
    2: Next use Disk Utility to Erase Free Space with Zero option on the Macintosh HD partition, this will map off bad sectors as DU will check the file it created for errors. 
    (#1 and #2 here fixed my issue trying to create a  partiton when DU failed.)
    3: Try to create your new partiton again, I suggest you use the BootCamp software partitoning portion as it's drop dead easy and you can later use Disk Utility to change the format from MSDOS to something else, like OS X Extended for installing OS X or whatever format you require.
    Or by Windows 7 installer which will change the format to NTFS for boot Windows in BootCamp.
    Drives, partitions, formatting w/Mac's + PC's
    https://www.apple.com/support/bootcamp/
    If DU doesn't repair the drive, next create a Recovery USB following these instructions and option key boot off of it and run Disk Utility on the entire drive to repair it.
    http://osxdaily.com/2011/08/08/lion-recovery-disk-assistant-tool-makes-external- lion-boot-recovery-drives/
    If you can't repair the drive, your going to have to use Disk Utility on the USB to Erase with Security Zero Erase, (that's one step from the right selection), the ENTIRE drive (select the drive makers name and size on the right).
    This will rebuild your partiton map (which can only be done booted from a external source) and fix your entire drive of bad sectors.
    Now use the USB to reinstall Lion and Recovery from Apple's servers, you will need your AppleID and password,  plus a fast relaible Internet connection.
    Next install your iLife by reading here
    https://support.apple.com/kb/HT4718
    Install your programs from original sources and create accounts with the same name, then return files from the storage drive you made earlier.
    You can read about bad sectors on hard drives here
    Reducing bad sectors effect on hard drives

  • How to create timed out error

    Hi All,
    I want to create a timed out error as I need it for testing some code.
    I am using "Wait" statement to make it wait more than the set run time, but its not working.
    Can some one give me a code snippet to create timed out error.
    Thanks and Regards
    Ankit.

    hi,
      take a two variables of type sy-uzeit.
    at the beginning of the program..
      v_starttime = sy-uzeit.
    loop at itab.
    v_difference = sy-uzieit - v_starttime.
    if v_difference > 100.
    raise execption TIMED_OUT.
    endif.
    endloop..
    THANKS
    Mahesh

  • I am syncing my ipod but it comes up with a error saying itunes could not backup the ipod because the backup was corrupt or not compatible with the ipod, what do i do?

    i am syncing my ipod but it comes up with a error saying itunes could not backup the ipod because the backup was corrupt or not compatible with the ipod, what do i do?

    As I said the iTunes program on the computer.  You open iTunes on the computer and go to the View menue in the upper rightand then click on preferences. Go to Devices and delete the backup.

  • I am trying to burn a dvd on my mac book pro but it comes up with an error code 0x80020022. How do I fix it? Thanks

    I am trying to burn a dvd on my mac book pro but it comes up with an error code 0x80020022. How do I fix it? I have tried rebooting through PRAM and various other options that I found online, but nothing has helped.
    Thanks

    Try using a different brand of DVD's.

  • Invalid state in SQL query for a function that was created with no errors.

    SQL> CREATE OR REPLACE FUNCTION overlap(in_start1 IN TIMESTAMP, in_end1 IN TIMESTAMP, in_start2 IN TIMESTAMP, in_end2 IN TIMESTAMP) RETURN NUMBER
    2 IS
    3
    4 BEGIN
    5 IF (in_start1 BETWEEN in_start2 AND in_end2 OR in_end1 BETWEEN in_start2 AND in_end2 OR in_start2 BETWEEN in_start1 AND in_end1) THEN
    6 RETURN 0;
    7 ELSE
    8 RETURN 1;
    9 END IF;
    10 END;
    11 /
    Function created.
    SQL> show errors;
    No errors.
    SQL>
    SQL> SELECT * FROM tbl where overlaps(current_time,current_time+1,current_time-1,current_time+2) = 0;
    SELECT * FROM tbl where overlaps(current_time,current_time+1,current_time-1,current_time+2) = 0
    ERROR at line 1:
    ORA-06575: Package or function OVERLAPS is in an invalid state
    I do not understand why overlaps is returned as in invalid state in the query, when it was created with no errors earlier. Could anyone help me?

    Marius
    Looking at the logic you are trying to create it looks like you are looking for overlapping time periods.
    Consider two date/time ranges:
    Range 1 : T1 - T2
    Range 2 : T3 - T4
    Do they overlap?
    1) No: T1 < T4 (TRUE)  T2 > T3 (FALSE)
    T1 --- T2
               T3 --- T4
    2) Yes: T1 < T4 (TRUE)  T2 > T3 (TRUE)
    T1 ---------- T2
               T3 --- T4
    3) Yes: T1 < T4 (TRUE)  T2 > T3 (TRUE)
    T1 -------------------- T2
               T3 --- T4
    4) Yes: T1 < T4 (TRUE)  T2 > T3 (TRUE)
                   T1 ----- T2
               T3 --- T4
    5) Yes: T1 < T4 (TRUE)  T2 > T3 (TRUE)
               T1 --- T2
           T3 ------------ T4
    5) No: T1 < T4 (FALSE) T2 > T3 (TRUE)
                    T1 --- T2
           T3 --- T4Answer: Yes they overlap if:
    T1 < T4 AND T2 > T3
    So you can code the logic in your SQL as simply:
    SELECT *
    FROM tbl
    WHERE range1_start < range2_end
    AND    range_1_end > range2_startIf you go around implementing PL/SQL functions for simple logic that can be achieved in SQL alone then you cause context switching between the SQL and PL/SQL engines which degrades performance. Wherever possible stick to just SQL and only use PL/SQL if absolutely necessary.

  • I downloan and updated my iphone software ...i have tried to activate it back but it is not working out error message always what can i do?

    i downloan and updated my iphone software ...i have tried to activate it back but it is not working out error message always what can i do?

    this is the error message........we are sorry we can not continue with your activation please contact customer care
    another message will say actiavtion server not available;
    please what should i do?

  • HT1414 I have iphone 4; tried to sync it said I need to update software so I clicked ok - it then said I need to restore and did above got to stage 3, clicked restore and update, but it comes up with an error saying iphone cannot be found Please help!!!

    I have iphone 4; tried to sync it said I need to update software so I clicked ok - it then said I need to restore and did above got to stage 3, clicked restore and update, but it comes up with an error saying iphone cannot be found Please help!!!

    Dear Jody..jone5
    Good for you that can't update your iphone because I did it and my iphone dosen't work for example I can't download any app like Wecaht or Twitter..
    Goodluck
    Atousa

  • HT201210 i am trying to restore my phone but its coming up with an error.

    i am trying to restore and backup my iphone 5 but its comung up with an error!

    If you are using an iphone, take it to your nearest apple shop if you have one available.  However make sure your current phone info ie, applications have been stored on your computer.  This happens automaticlly in the first phase of restoring your phone when it is retrieved from your phone. That way you don't lose your vital info and contacts once your phone has been restored.  Basically do not opt for restore as a new phone on your return from the Apple shop.  I had the same experience last Thursday.

  • Warning: Type created with compilation errors. sql : oracle 11gr2

    I'm trying to create a supertype customer service and subtype agent and supervisor, so they can inherent values however when I try to run this in oracle sql: a message comes up
    Warning: Type created with compilation errors.
    What is wrong with the code below?
    Create or replace type customer_s_type as object ( csID number, csName varchar(15), csType number ) NOT FINAL;  Create or replace type supervisor_type UNDER customer_s_type ( title varchar (10) );  Create or replace type agent_type UNDER customer_s_type (title varchar (10));  Create table supervisor of supervisor_type ( CONSTRAINT supervisor_PK PRIMARY KEY (csID));  Create table agent of agent_type (CONSTRAINT agent_PK PRIMARY KEY (csID));  create table customer_service( csID number(10), csType number(10), constraint supervisor_pk primary key(csID) );

    Wile creating TYPE you need to terminate with a back slash (/) semi colon does not work.
    Try like this
    create or replace type customer_s_type as object ( csid number, csname varchar(15), cstype number ) not final
    create or replace type supervisor_type under customer_s_type ( title varchar (10) )
    create or replace type agent_type under customer_s_type (title varchar (10))

Maybe you are looking for

  • Filling in quadrilaterals in a pixel array

    Short version: Does anyone know of an algorithm like fillPolygon, but that works with a pixel array? (and doesn't need more than v1.1) Thanks. Long version: Hi. Hope there's a math guru among you who can give me a clue... I'm doing an animated 3D app

  • If i go the Boot camp route, i have a genuine Win 7 disc ....

    Hi all, i am very intrigued about this Boot Camp idea, i have just switched as of yesterday, my old Windows 7 lap top has got a genuine windows 7 on it, so if reformat my old lap top i could then use the win7 disc to put it on the mac. On my old Lap

  • Fund Mgt module

    Hi all For Fund Mgt module, user uses the Fund Centre Group, Commitment Item Group and Budget Version. Please advise the extraction table for this. will assign points**** Thanks, Purna

  • Castor XML mapping problems

    I am using Castor to bind XML to Java objects. I am using a mapping file. My XML file consists of a lot of namespaces. How can i specify these namespaces in the mapping file? Thanks in advance

  • Is there a trade up program for ipad?

    I really want an ipad2 but dont want to take a beating on my ipad 1. Any way to trade up through apple?