Suppose There is a string
A.B....C.......D.........E........F In this string dots (.)
are not having fixed count in between of string. I want the
output to have string with one dot between. I.e.
A.B.C.D.E.F
Answers were Sorted based on User's Feedback
Answer / oddabout.com
SELECT replace(replace(replace('A.B....C.......D.........E........F','.',' @'),'@ ',''),' @','.') FROM dual
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / dilip kumar
SELECT REGEXP_REPLACE (
Replace ('A.B....C.......D.........E........F', '.', ' '),
'( ){1,}',
'.')
FROM DUAL;
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / sreenivasulu sangatipalli
SELECT regexp_replace('A...B..C.D......E....F', '[.]+', '.') FROM DUAL;
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / anuradha
SELECT REGEXP_REPLACE (
REPLACE ('A.B....C.......D.........E........F', '.', ' '),
'( ){2,}',
'.')
FROM DUAL;
Is This Answer Correct ? | 3 Yes | 5 No |
Answer / sunaksha
select REGEXP_REPLACE ('A.B....C.......D.........E........F','.{1,}',
'.') FROM DUAL;
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / sandeep kumar
select replace(regexp_replace(replace
('A.B....C.......D.........E........F','.',' '),'( )
{2,}',' '),' ','.') from dual
Is This Answer Correct ? | 1 Yes | 13 No |
How exception handling is done in advance pl/sql?
What is trigger in pl sql with examples?
What is %type in pl sql?
Mention what are the benefits of pl/sql packages?
1.when will you use week refcursor and when will you use strong ref cursor ? 2.what is the use of sql trace..how do you use it ? 3.can you please send all the sql plus commands...like set line 6000....
How to remove duplicate rows from a table?.
What are the components of a PL/SQL block ?
Why do we use joins in sql?
What information is needed to connect sql*plus an oracle server?
write sub query for eliminating duplicate rows using analytical function?
Can a table have no primary key?
what is SCALAR Queries?