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

In what condition is it good to disable a trigger?

0 Answers  


What is clustered and non-clustered indexes?

4 Answers   Microsoft,


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

0 Answers  


How can I tell if sql is running?

0 Answers  


What is pl sql commands?

0 Answers  






Explain how exception handling is done in advance pl/sql?

0 Answers  


Main diff between varray and nested tablea

3 Answers   Polaris, TCS,


Can sql developer connect to db2?

0 Answers  


How do I partition in sql?

0 Answers  


What is sql keyword?

0 Answers  


Why we use cross join?

0 Answers  


What is the requirement of self-join?

0 Answers  


Categories