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 |
Can we create table inside stored procedure?
How to avoid using cursors? What to use instead of cursor and in what cases to do so?
We have a CURSOR then we need BULK COLLECT?
what is the differnce between procedure and function? in both dml operations can work and in procedure through out parameter you can return value ,then what is the differce?
Why indexing is needed?
what is the command used to fetch first 5 characters of the string? : Sql dba
How do I create a memory optimized filegroup?
What is the different between Stored Procedure and Procedure?
what is a table in a database ? : Sql dba
What are the possible values for the boolean data field?
Describe types of sql statements?
How to start oracle sql developer?