DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: how to get max length of variable?

  1. #1
    Join Date
    Feb 2006
    Posts
    1

    how to get max length of variable?

    All,
    I'm not having any luck searching for this question. Is there a way to find the maximum length of a variable in PL/SQL (ORA 9i).

    For instance:

    sample VARCHAR2(75);

    I would like to return the value 75.

    I thought perhaps this would work, but no luck.

    LENGTH(sample%TYPE);

    and LENGTH(sample) only returns the length of the string itself, not what the maximum could be. and MAXLENGTH doesn't seem to exist.

    Thanks in advance.

    --james

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool


    What's wrong with looking at the source code?
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

Posting Permissions

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


Click Here to Expand Forum to Full Width