<?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 a column to remove a certain character</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/sqlupdate-a-column-to-remove-a-certain-character/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/sqlupdate-a-column-to-remove-a-certain-character/</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jun 2013 01:14:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sqlupdate-a-column-to-remove-a-certain-character/#comment-63952</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Tue, 26 May 2009 18:42:35 +0000</pubDate>
		<guid isPermaLink="false">#comment-63952</guid>
		<description><![CDATA[Assuming that you are using SQL Server, you could use the SUBSTRING and CHARINDEX functions.

Something like this:

&lt;code&gt;SELECT SUBSTRING(your_column,CHARINDEX(&#039;*&#039;,your_column),1) has_asterisk,
SUBSTRING(your_column,CHARINDEX(&#039;*&#039;,your_column)+1,LEN(your_column)) number FROM book;&lt;/code&gt;

If you are using Oracle, you should use SUBSTR and INSTR instead.]]></description>
		<content:encoded><![CDATA[<p>Assuming that you are using SQL Server, you could use the SUBSTRING and CHARINDEX functions.</p>
<p>Something like this:</p>
<p><code>SELECT SUBSTRING(your_column,CHARINDEX('*',your_column),1) has_asterisk,<br />
SUBSTRING(your_column,CHARINDEX('*',your_column)+1,LEN(your_column)) number FROM book;</code></p>
<p>If you are using Oracle, you should use SUBSTR and INSTR instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lazy167</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sqlupdate-a-column-to-remove-a-certain-character/#comment-63941</link>
		<dc:creator>lazy167</dc:creator>
		<pubDate>Tue, 26 May 2009 14:49:41 +0000</pubDate>
		<guid isPermaLink="false">#comment-63941</guid>
		<description><![CDATA[Thanks works great!
On another note, is there a way to split the column into 2 so that 1 column shows whether that number has a * prefix or not? 
eg
&lt;code&gt;*      &#124;99
*      &#124;12
null &#124;23
*      &#124; 68
*      &#124; 48
null &#124; 89
null &#124; 13&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>Thanks works great!<br />
On another note, is there a way to split the column into 2 so that 1 column shows whether that number has a * prefix or not?<br />
eg<br />
<code>*      |99<br />
*      |12<br />
null |23<br />
*      | 68<br />
*      | 48<br />
null | 89<br />
null | 13</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 5/8 queries in 0.021 seconds using memcached
Object Caching 283/284 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-06-19 02:33:33 -->