Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2004
    Posts
    8

    Unanswered: Get the Length of a LONG datatype

    Is there a way to get the length of a LONG or LONG RAW datatype in Oracle 8i without having to convert it to a LOB type?

  2. #2
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    In 8i, there is no way to get the length of a long without actually fetching it first.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  3. #3
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    You can try using the DBMS_LOB.GETLENGTH() function.

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    Quote Originally Posted by JMartinez
    You can try using the DBMS_LOB.GETLENGTH() function.
    As far as I remember, that routine only works for BLOB, CLOB, and BFILE.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Quote Originally Posted by beilstwh
    As far as I remember, that routine only works for BLOB, CLOB, and BFILE.
    Correct:
    Code:
    SQL> select dbms_lob.getlength(text) from user_views;
    select dbms_lob.getlength(text) from user_views
                              *
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype

  6. #6
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Try

    sys.utl_raw.length(long raw column)

    HTH
    Gregg

  7. #7
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Nope:
    Code:
    SQL> select sys.utl_raw.length(text) from user_views;
    select sys.utl_raw.length(text) from user_views
                              *
    ERROR at line 1:
    ORA-00997: illegal use of LONG datatype
    There really is very little you can do with a LONG!

Posting Permissions

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