Like shown below i have 3 columns(Name,No,Address). The
values in name column i want to modity.
Requirement : Keep only once space between two words
(Fname,Lname) in the Name column.
For this what is the query? Please answer me. Advance
Thanks.


Name No Address Reference

manoj kumar
kumar raja
vinzay kumar
rajendra prasad
gowri nath -- -- --

Answer Posted / lince

select substring(NAME,1,charindex(' ',NAME))+' '+
replace(substring(NAME,charindex(' ',NAME),len(NAME)),' ','')
as NAME from test

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I make my sql query run faster?

470


which operator is used in query for pattern matching? : Sql dba

547


What is the maximum size of sqlite database?

549


What is the difference between count 1 and count (*) in a sql query?

505


What is the max nvarchar size?

522






What is sql stand for?

577


how to create a new table by selecting rows from another table in mysql? : Sql dba

563


Why we use sql profiler?

563


Does execute immediate commit?

700


What is the non-clustered index in sql?

589


how to check server status with 'mysqladmin'? : Sql dba

573


What is fmtonly in sql?

534


What is difference between hql and sql?

512


What are variables in pl sql?

569


Differentiate between pl/sql and sql?

619