Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / English Query / August 2008

Tip: Looking for answers? Try searching our database.

Updating data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rockhardten - 22 Aug 2008 21:30 GMT
Hello again, ive got a table with a column that normally contains a number,
for example, 4057. But there are some that finishes with an a, for example,
4057a. I want to quit the "a" and place a "1" instead, so in the last
example, the 4057a will be a 40571.

The column name is called ID and the table name is called dbo.runners

Many thanks.
Tariq - 27 Aug 2008 15:35 GMT
Try it,

you can use restrict update clause by putting more conditions in where clause.

update dbo.runners set id=replace(id,'a','1') where charindex('a',id)>0
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.