need to split a string into separate values.
eg.
col1 col2
----------
100 - 'a,b,c'
200 - 'a,x,d,e'
300 - 'c'
result:
value count
-------------
a - 2
b - 1
c - 2
etc.
Answer Posted / sharath sn
substr('a,b,c',',',instr('a,b,c',',',1,1)-1)
,substr('a,b,c',instr('a,b,c',',',1,1)+1,instr
('a,b,c',',',2,1)-instr('a,b,c',',',1,1)-1)
,substr('a,b,c',instr('a,b,c',',',2,1)-1);
Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
What is the sql*loader? : aql loader
What are joins in sql?
What is package in pl sql with an examples?
What is file based approach?
Explain what is sql*plus?
what is myisam? : Sql dba
What are tables and fields in the database?
What are tables in sql?
Explain the savepoint statement.
What is the difference between an inner join and an outer join?
What are user defined functions?
Is sql a backend language?
How can you load microsoft excel data into oracle? : aql loader
Is nosql relational?
what are date and time data types? : Sql dba