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



Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not h..

Answer / oddabout.com

SELECT replace(replace(replace('A.B....C.......D.........E........F','.',' @'),'@ ',''),' @','.') FROM dual

Is This Answer Correct ?    8 Yes 1 No

Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not h..

Answer / dilip kumar

SELECT REGEXP_REPLACE (
Replace ('A.B....C.......D.........E........F', '.', ' '),
'( ){1,}',
'.')
FROM DUAL;

Is This Answer Correct ?    3 Yes 2 No

Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not h..

Answer / sreenivasulu sangatipalli

SELECT regexp_replace('A...B..C.D......E....F', '[.]+', '.') FROM DUAL;

Is This Answer Correct ?    0 Yes 0 No

Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not h..

Answer / anuradha

SELECT REGEXP_REPLACE (
REPLACE ('A.B....C.......D.........E........F', '.', ' '),
'( ){2,}',
'.')
FROM DUAL;

Is This Answer Correct ?    3 Yes 5 No

Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not h..

Answer / sunaksha

select  REGEXP_REPLACE ('A.B....C.......D.........E........F','.{1,}',
'.') FROM DUAL; 

Is This Answer Correct ?    0 Yes 3 No

Suppose There is a string A.B....C.......D.........E........F In this string dots (.) are not h..

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

Post New Answer

More SQL PLSQL Interview Questions

Can we create table inside stored procedure?

0 Answers  


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

0 Answers  


We have a CURSOR then we need BULK COLLECT?

1 Answers  


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?

3 Answers   3i Infotech,


Why indexing is needed?

0 Answers  






what is the command used to fetch first 5 characters of the string? : Sql dba

0 Answers  


How do I create a memory optimized filegroup?

0 Answers  


What is the different between Stored Procedure and Procedure?

7 Answers   Informatica, MIS,


what is a table in a database ? : Sql dba

0 Answers  


What are the possible values for the boolean data field?

0 Answers  


Describe types of sql statements?

0 Answers  


How to start oracle sql developer?

0 Answers  


Categories