 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SQL update command to update certain digits in a row of a column with VARCHAR2(9) DATATYPE.</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/sql-update-command-to-update-certain-digits-in-a-row-of-a-column-with-varchar29-datatype/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-update-command-to-update-certain-digits-in-a-row-of-a-column-with-varchar29-datatype/</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 12:07:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: sql update command to update certain digits in a row of a column with VARCHAR2(9) DATATYPE. (Q/A) &#124; Seek The Sun Slowly</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-update-command-to-update-certain-digits-in-a-row-of-a-column-with-varchar29-datatype/#comment-108254</link>
		<dc:creator>sql update command to update certain digits in a row of a column with VARCHAR2(9) DATATYPE. (Q/A) &#124; Seek The Sun Slowly</dc:creator>
		<pubDate>Fri, 08 Jun 2012 14:34:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-108254</guid>
		<description><![CDATA[[...] Address: http://itknowledgeexchange.techtarget.com/itanswers/sql-update-command-to-update-certain-digits-in-a...        (0) Comments   Read [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Address: <a href="http://itknowledgeexchange.techtarget.com/itanswers/sql-update-command-to-update-certain-digits-in-a" rel="nofollow">http://itknowledgeexchange.techtarget.com/itanswers/sql-update-command-to-update-certain-digits-in-a</a>&#8230;        (0) Comments   Read [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pasztorz</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-update-command-to-update-certain-digits-in-a-row-of-a-column-with-varchar29-datatype/#comment-46634</link>
		<dc:creator>pasztorz</dc:creator>
		<pubDate>Sat, 07 Oct 2006 03:53:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-46634</guid>
		<description><![CDATA[A variation to the theme:

&lt;code&gt;UPDATE table SET field = substr(FIELD,1,3)&#124;&#124; &#039;08&#039; &#124;&#124; substr(FIELD,6)
WHERE substr(FIELD,4,2) = &#039;18&#039;;&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>A variation to the theme:</p>
<p><code>UPDATE table SET field = substr(FIELD,1,3)|| '08' || substr(FIELD,6)<br />
WHERE substr(FIELD,4,2) = '18';</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: randym</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sql-update-command-to-update-certain-digits-in-a-row-of-a-column-with-varchar29-datatype/#comment-46635</link>
		<dc:creator>randym</dc:creator>
		<pubDate>Fri, 06 Oct 2006 12:20:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-46635</guid>
		<description><![CDATA[Oracle has the Replace function but that will replace all occurrences of one value to another.  So if you can have multiple &quot;15&quot; in the field, replace can&#039;t be used for your situation.  For your example of replacing 15 with 08, try something like this:

&lt;code&gt;update table 
set field = substr(field,1,3) &#124;&#124; &#039;08&#039; &#124;&#124; substr(field,6,4))
where substr(field,4,2)=&#039;15&#039;;&lt;/code&gt;

If the rows will only have a 15 in position 4 and 5, you could use:

&lt;code&gt;update table
set field = replace(field,&#039;15&#039;,&#039;08&#039;);&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>Oracle has the Replace function but that will replace all occurrences of one value to another.  So if you can have multiple &#8220;15&#8243; in the field, replace can&#8217;t be used for your situation.  For your example of replacing 15 with 08, try something like this:</p>
<p><code>update table<br />
set field = substr(field,1,3) || '08' || substr(field,6,4))<br />
where substr(field,4,2)='15';</code></p>
<p>If the rows will only have a 15 in position 4 and 5, you could use:</p>
<p><code>update table<br />
set field = replace(field,'15','08');</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.013 seconds using memcached
Object Caching 296/299 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-21 12:18:54 -->