|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Yesterday @ 8:00 AM
Points: 21,
Visits: 124
|
|
Hey Erik,
I created a table #temp with one field. I inserted four rows in it. Then tried the replace statement as you did.
CREATE TABLE #temp ( word VARCHAR(100))
SELECT * FROM #temp --saat --bat --hoot --boot
SELECT REPLACE(word,'oo','**') FROM #temp --saat --bat --h**t --b**t
You must use the column name ( word in my table) in 1st expression, then the pattern (in singlequotes) in 2nd expression and the replace string pattern(in single quotes) in 3rd expression.
Hope this helps !!!
Regards, Suresh
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 12, 2013 12:31 PM
Points: 6,
Visits: 6
|
|
| Thank you and all who responded. I had to break away for a lenghty meeting and will being trying the solutions in a bit. I'll report back the results.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, February 12, 2013 12:31 PM
Points: 6,
Visits: 6
|
|
Hi,
I was able to execute the following in Management studio successfully but was unable to replicate the results when using BIDS.
Update dbo.mydatabase Set stage = REPLACE(Stage,'Closed Won','Awarded')
I tried the table solution but was not able to achieve the desired results.
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Yesterday @ 1:39 PM
Points: 860,
Visits: 423
|
|
I may be missing something here, but why not just
update mydatabase set stage = 'Awarded' where stage = 'Closed Won'
|
|
|
|