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

The select into statement is most often used to create backup copies of tables or for archiving records?

773


Why procedure is used in sql?

754


Is ms sql traffic encrypted?

685


Explain what is rdbms?

784


What will you get by the cursor attribute sql%found?

703






Can 2 queries be executed simultaneously in a distributed database system?

865


What is sorting in sql?

677


What is the use of sql trace?

680


how to rename an existing column in a table? : Sql dba

697


How many sectors are in a partition?

748


what is user defined functions? : Sql dba

744


Why do we need cursors in pl sql?

721


Sql technical questions

1002


How does a trigger work?

721


Are stored procedures compiled?

678