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!

Using substr function

655717May 29 2009 — edited May 29 2009
I'm trying to pull back the first four digits of the varialbe xYearId, saying the varialbe is = 200955 I want to pull back 2009.

I tried the folloiwng (sample below for demonstration purposes):
select substr(0,4,200955) as value
from dual;
but I get a null returned for value, am I doing something wrong here?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2009
Added on May 29 2009
5 comments
338 views