Results 1 to 3 of 3

Thread: ORA-00997 error

  1. #1
    Join Date
    Apr 2004
    Posts
    69

    Unanswered: ORA-00997 error

    I get exception when the following query is executed in SQLPLus :

    SELECT * FROM org WHERE CAST(CAST(SUBSTR(DDL_sun, 1, 4) AS LONG RAW) AS INTEGER) = 10.

    Exception is :

    ORA-00997: illegal use of LONG datatype

    Can anyone point out the reason ?

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    from http://asktom.oracle.com
    In Oracle8i, releases 8.0 and up, you should not be using LONG RAW. Both LONG and LONG RAW are only provided for backwards compatibility -- they are deprecated datatypes.

    You should be using blob -- then its as easy as above (create table as select). LONGS and LONG RAWS come with many many limits (no use in WHERE clause, no insert into select LONG, no create table as SELECT, no chance of manipulation in PLSQL -- only in 3gls, no replication, etc, etc, etc). BLOBS and CLOBS do not suffer from these limits.

    NO USE of LONG RAW in WHERE clause!
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    anacedent's message is very true ... Unfortunately, some are STUCK with 3rd party software that have yet to get up-to-speed with the "real world"...

    Try using the Oracle package UTL_RAW.CAST_TO_RAW ...

    hth
    Gregg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •