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
What is the difference between unique and primary key constraints?
What is sql key?
where are cookies actually stored on the hard disk? : Sql dba
Explain the steps needed to create the scheduled job?
How does cross join work?
What is the maximum number of columns in sql table?
What is a system versioned table?
What are the types of operators available in sql?
How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000
What is the most restrictive isolation level? : Transact sql
What is the difference between the conventional and direct path loads? : aql loader
What are stuff and replace function?
is it possible to pass an object or table to a procedure as an argument?
How do I find duplicates in two columns?
What is transaction control language (tcl)?