tags:

views:

30

answers:

1

Hello,

I have the following in my string "1406984110015" what I would like is to get;

str1 = 14 
str2 = 06
str3 = 84

I am creating a function in ORACLE that would in this case return 14.06.84

Any ideas?

+5  A: 

Use SUBSTR: SUBSTR Documentation

str1:=SUBSTR(source_string, 1, 2);
str2:=SUBSTR(source_string,3,2);
str3:=SUBSTR(source_string,5,2);

(This assumes of course that you want three sets of two characters, as your example showed.)

Wade Williams
thank you for ur answer
Adnan