<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Powertips &#187; SQL Server String Functions</title>
	<atom:link href="http://scripting.chaindb.com/category/database/mssqlserver/sql-server-string-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://scripting.chaindb.com</link>
	<description>Programmer tips</description>
	<lastBuildDate>Tue, 15 May 2012 23:56:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>CHARINDEX vs PATINDEX</title>
		<link>http://scripting.chaindb.com/2011/04/15/charindex-vs-patindex/</link>
		<comments>http://scripting.chaindb.com/2011/04/15/charindex-vs-patindex/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 02:00:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL Server String Functions]]></category>
		<category><![CDATA[charindex]]></category>
		<category><![CDATA[patindex]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=952</guid>
		<description><![CDATA[Both functions take two arguments. With PATINDEX, you must include percent signs before and after the pattern, unless you are looking for the pattern as the first (omit the first %) or last (omit the last %) characters in a column. For CHARINDEX, the pattern cannot include wildcard characters. The second argument is a character [...]]]></description>
			<content:encoded><![CDATA[<p>Both functions take two arguments. With PATINDEX, you must include percent signs before and after the pattern, unless you are looking for the pattern as the first (omit the first %) or last (omit the last %) characters in a column. For CHARINDEX, the pattern cannot include wildcard characters. The second argument is a character expression, usually a column name, in which Adaptive Server searches for the specified pattern.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-7360303176440694";
/* scripting_468x15, created 5/12/10 */
google_ad_slot = "3352621531";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<strong>Example of CHARINDEX:</strong><br />
USE AdventureWorks;<br />
GO<br />
SELECT CHARINDEX(&#8216;ensure&#8217;, DocumentSummary)<br />
FROM Production.Document<br />
WHERE DocumentID = 3;<br />
GO</p>
<p><strong>Examples of PATINDEX:</strong><br />
USE AdventureWorks;<br />
GO<br />
SELECT PATINDEX(&#8216;%ensure%&#8217;,DocumentSummary)<br />
FROM Production.Document<br />
WHERE DocumentID = 3;<br />
GO<br />
<script type="text/javascript"><!--
google_ad_client = "pub-7360303176440694";
/* scripting_Banner (468 x 60) */
google_ad_slot = "0537236933";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<a href="http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/">Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2011/04/15/charindex-vs-patindex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

