Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to edit colum info ?

Author  Topic 

5416339
Starting Member

2 Posts

Posted - 2011-04-01 : 08:13:15
What is the query to edit and replace and existing data in a column with a new one.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-04-01 : 09:03:12
Use update query

update table
set col=replace(col,'some value','replaced value')

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

mmarovic
Aged Yak Warrior

518 Posts

Posted - 2011-04-01 : 11:36:16
Madhi, I think what "the number" had in mind was even simpler:
update table set col = value where conditions


Mirko

My blog: http://mirko-marovic-eng.blogspot.com/
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-04-01 : 12:05:02
quote:
Originally posted by mmarovic

Madhi, I think what "the number" had in mind was even simpler:
update table set col = value where conditions


Mirko

My blog: http://mirko-marovic-eng.blogspot.com/


You are correct

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

5416339
Starting Member

2 Posts

Posted - 2011-04-03 : 10:48:11
Doesn't seem to be working.I get some erros can you give me the exact code with "commas"..etc..
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-04-05 : 06:06:36
quote:
Originally posted by 5416339

Doesn't seem to be working.I get some erros can you give me the exact code with "commas"..etc..


Post the code you used

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -