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
how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc
how to create a new table by selecting rows from another table in mysql? : Sql dba
What is sqlite format?
What are all the different types of indexes?
What is not equal in sql?
What is a mutating table and a constraining table?
Are stored procedures faster than dynamic sql?
What are the uses of sysdate and user keywords?
How to handle bulk data?
What are the uses of merge?
What is the use of double ampersand (&&) in sql queries? Give an example
What are different methods to trace the pl/sql code?
How to order siblings in oracle hierarchy queries?
What is localdb mssqllocaldb?
What is bind reference and how can it be created?