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?