You use SUBSTR with positive or negative integers as I showed you above.
Note that when using a negative integer (RIGHT) you don't have to specify the starting position, whereas when using a positive integer you have to specify the starting postition to be 1 to work as (LEFT) function. If the starting postition is other then 1, then SUBSTR becomes (MID)
Main Topics
Browse All Topics





by: paquicubaPosted on 2007-02-15 at 08:29:39ID: 18541439
PAQUI@PROD > SELECT SUBSTR('YOUR NAME',1,4) FROM DUAL;
SUBS
----
YOUR
PAQUI@PROD > SELECT SUBSTR('YOUR NAME',-4) FROM DUAL;
SUBS
----
NAME