Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello
please write query
table name is : abctable
my data to update in below formate
actual data-
R06E310.0N
R06E310.0V
R06E315.0N
R06E315.0V
R06E320.0N
R06E320.0V
R06E35.5N
R06E35.5V
R06F31.0N


wants to update like this-
R06E3-10.0N
R06E3-10.0V
R06E3-15.0N
R06E3-15.0V
R06E3-20.0N
R06E3-20.0V
R06E3-5.5N
R06E3-5.5V
R06F3-1.0N



so please write a query for this.


Thanks
Shubham Gupta
Posted
Comments
Peter Leow 17-Feb-15 1:33am    
What have you tried? Where are you stuck?

1 solution

SQL
update abctable set columnName=
substring(columnName,1,5)+'-'+substring(columnName,7,len(columnName)-5)


ref.
https://msdn.microsoft.com/en-us/library/ms187748.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900