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.
| Author |
Topic |
|
bobshishka
Yak Posting Veteran
72 Posts |
Posted - 2007-12-06 : 18:37:04
|
| I screwed up my database and double added data to a text field.For example I need made this:'http://192.168.200.1/images/' +PATH+ '.jpg' Look like this:'http://192.168.200.1/images/http://192.168.200.1/images/12345.jpg'How can I query to reset this?update perimageset PERIMAGE_PATH = 'http://192.168.200.1/images/' +PATH+ '.jpg'WHERE PERIMAGE_PATH <> 'http://192.168.200.1/images/' +PATH+ '.jpg'That just makes the problem worse |
|
|
bobshishka
Yak Posting Veteran
72 Posts |
Posted - 2007-12-06 : 18:44:39
|
| Or how can I just delete all the data from the 'IMAGE_PATH' column in the IMAGE table? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-12-06 : 18:58:27
|
Does PATH contain http://192.168.200.1/images/? If so, you can use this SET statement:SET PERIMAGE_PATH = PATH + '.jpg'WHERE ...quote: Or how can I just delete all the data from the 'IMAGE_PATH' column in the IMAGE table?
UPATE IMAGESET IMAGE_PATH = ''orUPDATE IMAGESET IMAGE_PATH = NULLjust depends on what you mean by delete.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
bobshishka
Yak Posting Veteran
72 Posts |
Posted - 2007-12-06 : 19:05:20
|
| I figured out my problem. Thanks |
 |
|
|
|
|
|