Results 1 to 2 of 2

Thread: Substr

  1. #1
    Join Date
    Apr 2003
    Posts
    19

    Unanswered: Substr

    Hi all experts,

    I have a table with column TEXT VARCHAR2(300), TPRODLINE (sequence id). Users can key any text (including carriage returns etc) in the TEXT column.

    When I

    SQL>select length(substr(text,80,160)) length from tprodnote where tprodline = 2025;

    I get

    LENGTH
    ---------
    111


    When I am only expecting 81 characters.

    Any advice, greatly appreciated!

    Cheers,

    Pei

  2. #2
    Join Date
    Apr 2003
    Posts
    19

    substr

    Sorry!

    I have found my error. I should be doing ...

    SQL>select length(substr(text,80,80)) length from tprodnote where tprodline = 2025;

    Duh!!

Posting Permissions

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