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


Please Help Members By Posting Answers For Below Questions

Explain what is sql?

617


What is the purpose of a sql?

536


What are crud methods?

562


What are the packages in pl sql?

585


Can we use delete in merge statement?

520






Does inner join remove duplicates?

530


what is oltp (online transaction processing)? : Sql dba

542


What is the best sql course?

541


How do you create an update query?

536


What's the procedure?

502


Why left join is used in sql?

530


Is primary key an index?

545


Why do we use procedures in pl sql?

527


What is auto increment?

586


What is a dynamic query?

583