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 |
suppose we have values like 1 5 7 in a colum.Now we want numbers like(2 3 4 6) that exists between 1 5 7.How can we do this using sql query??
What is view explain with example?
Which is faster truncate or drop?
Explain about various levels of constraint.
Can we call a function containing dml statements in a select query?
a procedure one in two out parameters i am waiting it in a sql query can i get the output
How to pipe multiline string to isql?
What is the difference between delete, truncate and drop command?
Can a select statement fire a trigger?
What is a primary key, and how is it different from a unique key?
I have a package in which a table was used in a procedure and compiled later i have dropped the table used in the package what would be the status of package specification and body
What is a parameter query?
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)