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 to place comments in pl/sql?
Why you are not able to create a table using select command,if it is having a LONG column? for eg:create table test as select * from test1 here test1 containg a column having LONG datatype...
What are different types of sql commands?
How do you add a column to a table?
What is clustered, non-clustured and unique index. How many indexes can be created on a table ?
What are advantages of Stored Procedures?
why use cursors?
Is progress software supports to ( pl/sql )?
What are keys in sql?
What is a design view?
Can you sum a count in sql?
what is online transaction processing (oltp)? : Sql dba
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)