Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting Size of Variable...

429371Mar 3 2008 — edited Mar 4 2008
I am trying to get the maximum length a variable can be in a PL/SQL procedure.

I do not hard code my datatypes, I am using database columns to do this for me. My columns do not change often but it is possible and can be done without warning. What I want to do is take a substring of the source column dynamically.

Source Column 32
Target Column 30
Variable_Name Targetcolumn%TYPE

Variable_Name := substr(Source Column, 1, MaxLengthOfTargetColumn);

I repeat that I do not want to hard code in the length of the target column into the substring. Is there any way to do this?

Thanks in Advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2008
Added on Mar 3 2008
8 comments
2,752 views