﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / replace characters on condition in table and cell / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 13:36:01 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: replace characters on condition in table and cell</title><link>http://www.sqlservercentral.com/Forums/Topic484693-338-1.aspx</link><description>you could try something like[code]UPDATE    EmployeesSET              Day1= '0'WHERE     (isnumeric(Day1) =1)UPDATE    EmployeesSET              Day1= '#'WHERE     (isnumeric(Day1) &amp;lt;&amp;gt;1)[/CODE]but from the brief look at your table it looks like you have some flaws in your Db design,  you could maybe improve it with better tables design and some normalisation.</description><pubDate>Tue, 15 Apr 2008 07:04:58 GMT</pubDate><dc:creator>steveb. </dc:creator></item><item><title>RE: replace characters on condition in table and cell</title><link>http://www.sqlservercentral.com/Forums/Topic484693-338-1.aspx</link><description>So you want to udpate data based on the name of a column? Is that right?</description><pubDate>Tue, 15 Apr 2008 05:57:45 GMT</pubDate><dc:creator>Grant Fritchey</dc:creator></item><item><title>RE: replace characters on condition in table and cell</title><link>http://www.sqlservercentral.com/Forums/Topic484693-338-1.aspx</link><description>Also asked here: [url=http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=100959]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=100959[/url]</description><pubDate>Mon, 14 Apr 2008 17:30:58 GMT</pubDate><dc:creator>RyanRandall</dc:creator></item><item><title>replace characters on condition in table and cell</title><link>http://www.sqlservercentral.com/Forums/Topic484693-338-1.aspx</link><description>need help replace characters on condition in table and cellsbut only if if i put number or 1 , 2 , 3 , 4 above the cell of the employee for example( employee id=222 name =bbbb day1)i replace characters  with '0' and '#'and it must  work dynamically AND replace ONLY THIS characters[u]table before the replace[/u]id fname val day1 day11 day111 day2 day22 day222 ------------------------------------------------------111 aaaa  2   1                                           4111 aaaa  1   A                                           C222 bbbb  2                             222 bbbb  1                  333 cccc  2                               333 cccc  1                               444 dddd  2                            444 dddd  1                         555 eeee  2   2                        555 eeee  1   B                                               [u]table after the replace[/u]id fname val day1 day11 day111 day2 day22 day222 ------------------------------------------------------111 aaaa  2    0                                            0111 aaaa  1    #                                           #  222 bbbb  2                             222 bbbb  1                  333 cccc  2                               333 cccc  1                               444 dddd  2                            444 dddd  1                         555 eeee  2   0                       555 eeee  1   #                                                 tnx FOR THE HELP</description><pubDate>Mon, 14 Apr 2008 16:34:10 GMT</pubDate><dc:creator>midan1</dc:creator></item></channel></rss>