i want count no of values in a column i.e
enam eempno phoneno
x 1 (98765,09887,096561,87964579,156678,678900876)
that means if i select phone no from table i want to get
total count of phone numbers i.e 6
Answer Posted / kavitha nedigunta
select count(*) from(
select trim(regexp_substr(initcap(phoneno),'[^,]+',1,level)) as phoneno
from testphone
connect by level <= length(regexp_replace(phoneno,'[^,]'))+1
)a
it will work in oracle 10g on words.
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
How do I copy a table in sql?
Why are cursors used?
what is a constraint? Tell me about its various levels. : Sql dba
Is sql a scripting language?
What are triggers and its uses?
What is exception? What are the types of exceptions?
Can you join a table to itself?
What is the maximum rows in csv?
how to return query output in html format? : Sql dba
What are the benefits of pl sql?
What is a parameter query?
Does varchar need length?
What is sql mysql pl sql oracle?
what is a control file ? : Sql dba
When are we going to use truncate and delete?