I have a table like this
Value String
-------------------
1 Cleo, Smith
I want to separate the comma delimited string into two colu
Using instring function :)
select Value,
substring(String,1,instr(String," ") -1) Fname,
substring(String,instr(String,",") +1) Sname
from tablename;
Used two functions,
1. substring(string, position, length)
==> returns string from positon to length
2. instr(string,pattern)
==> returns position of pattern.
If we don’t provide length argument in substring it returns until end of string