<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Search Text Field &#8211; CHARINDEX vs PATINDEX</title>
	<atom:link href="http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/</link>
	<description>Notes of a SQL Server MVP and Database Administrator</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:54:09 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brian Tkatch</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-53487</link>
		<dc:creator>Brian Tkatch</dc:creator>
		<pubDate>Mon, 06 Jul 2009 13:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-53487</guid>
		<description>@Ron

 This is a similar question as to why use &#039;=&#039; if we can always use &#039;LIKE&#039;. The major difference is if a wildcard needs to be escaped or not.

I would guess, but i have no idea, that pattern searching is slower because it does more.</description>
		<content:encoded><![CDATA[<p>@Ron</p>
<p> This is a similar question as to why use &#8216;=&#8217; if we can always use &#8216;LIKE&#8217;. The major difference is if a wildcard needs to be escaped or not.</p>
<p>I would guess, but i have no idea, that pattern searching is slower because it does more.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron Moses</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-53486</link>
		<dc:creator>Ron Moses</dc:creator>
		<pubDate>Mon, 06 Jul 2009 12:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-53486</guid>
		<description>One bit of info I&#039;m having trouble finding in any similar articles is... if PATINDEX is simply a more powerful CHARINDEX, why bother ever using CHARINDEX?  Is there a performance difference?</description>
		<content:encoded><![CDATA[<p>One bit of info I&#8217;m having trouble finding in any similar articles is&#8230; if PATINDEX is simply a more powerful CHARINDEX, why bother ever using CHARINDEX?  Is there a performance difference?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-47192</link>
		<dc:creator>SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</dc:creator>
		<pubDate>Tue, 24 Feb 2009 12:07:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-47192</guid>
		<description>[...] SQL SERVER - Search Text Field - CHARINDEX vs PATINDEX [...]</description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER &#8211; Search Text Field &#8211; CHARINDEX vs PATINDEX [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Coates</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-45850</link>
		<dc:creator>Dave Coates</dc:creator>
		<pubDate>Wed, 21 Jan 2009 16:43:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-45850</guid>
		<description>Thanks! Your tips helped me clean and move data from one database to another :) 

Nothing fancy, but was fun at least :D

Dave Coates
Port Elizabeth .NET Community Lead
South Africa</description>
		<content:encoded><![CDATA[<p>Thanks! Your tips helped me clean and move data from one database to another :) </p>
<p>Nothing fancy, but was fun at least :D</p>
<p>Dave Coates<br />
Port Elizabeth .NET Community Lead<br />
South Africa</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HAM</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-42579</link>
		<dc:creator>HAM</dc:creator>
		<pubDate>Tue, 09 Sep 2008 05:32:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-42579</guid>
		<description>i am using PatIndex and need more clear code... for example 

i want no. of letters next to the symbol &#039;-&#039; so i use 

patindex(&#039;%-%&#039;, company-name). its working successfully. 

but if the word is of &#039;company-name-id&#039; and i want to 

consider the symbol which is appearing at the last of the 

word, what i have to do?  patindex(&#039;%-%&#039;, company-name-
id) 

if i use this i am getting same as the previous... any one plz

 suggest me the correct solution for this?</description>
		<content:encoded><![CDATA[<p>i am using PatIndex and need more clear code&#8230; for example </p>
<p>i want no. of letters next to the symbol &#8216;-&#8217; so i use </p>
<p>patindex(&#8216;%-%&#8217;, company-name). its working successfully. </p>
<p>but if the word is of &#8216;company-name-id&#8217; and i want to </p>
<p>consider the symbol which is appearing at the last of the </p>
<p>word, what i have to do?  patindex(&#8216;%-%&#8217;, company-name-<br />
id) </p>
<p>if i use this i am getting same as the previous&#8230; any one plz</p>
<p> suggest me the correct solution for this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-35188</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 18 Apr 2008 10:13:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-35188</guid>
		<description>Hi, I&#039;ve just started using PatIndex - it&#039;s proved useful in a lot of my work lately.

Right now I am trying to do a search for one string, OR another. In other words a kind of &#039;string count&#039; function. So if either substring exists in a value, it returns true, or a number.

The string is: where column like &#039;%a%&#039; or column like &#039;%b%&#039;

The only problem is that &#039;column&#039; is itself a very long-winded subquery, so I don&#039;t want to have to write it out twice in the above string.

So can I use some kind of regex in patindex to find the above?

Hope this makes sense. thanks for your ideas..</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;ve just started using PatIndex &#8211; it&#8217;s proved useful in a lot of my work lately.</p>
<p>Right now I am trying to do a search for one string, OR another. In other words a kind of &#8217;string count&#8217; function. So if either substring exists in a value, it returns true, or a number.</p>
<p>The string is: where column like &#8216;%a%&#8217; or column like &#8216;%b%&#8217;</p>
<p>The only problem is that &#8216;column&#8217; is itself a very long-winded subquery, so I don&#8217;t want to have to write it out twice in the above string.</p>
<p>So can I use some kind of regex in patindex to find the above?</p>
<p>Hope this makes sense. thanks for your ideas..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-34066</link>
		<dc:creator>Ron</dc:creator>
		<pubDate>Fri, 29 Feb 2008 21:12:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-34066</guid>
		<description>You can use the REPLACE() function to remove or replace special characters.

If you have a string like ‘Peninsula Inv00estment Management Comç’ that is in a field called CompanyName just type the following:

Select REPLACE(CompanyName,&#039;ç&#039;, &#039;&#039;) from Company. You can nest several REPLACE() functions to take out numerous characters at once.

Ron</description>
		<content:encoded><![CDATA[<p>You can use the REPLACE() function to remove or replace special characters.</p>
<p>If you have a string like ‘Peninsula Inv00estment Management Comç’ that is in a field called CompanyName just type the following:</p>
<p>Select REPLACE(CompanyName,&#8217;ç&#8217;, &#8221;) from Company. You can nest several REPLACE() functions to take out numerous characters at once.</p>
<p>Ron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep Jagadeesan</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-22710</link>
		<dc:creator>Pradeep Jagadeesan</dc:creator>
		<pubDate>Mon, 26 Nov 2007 12:50:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-22710</guid>
		<description>How to search for special characters and remove it from the string
actual string  &#039;Peninsula Inv00estment Management Comç&#039;

after removed special char

&#039;Peninsula Inv00estment Management Com&#039;

Pl give me a solution.</description>
		<content:encoded><![CDATA[<p>How to search for special characters and remove it from the string<br />
actual string  &#8216;Peninsula Inv00estment Management Comç&#8217;</p>
<p>after removed special char</p>
<p>&#8216;Peninsula Inv00estment Management Com&#8217;</p>
<p>Pl give me a solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keerthi</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-20888</link>
		<dc:creator>Keerthi</dc:creator>
		<pubDate>Sun, 18 Nov 2007 21:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-20888</guid>
		<description>Hello Dave,

I have been using PATINDEX and CHARINDEX for my project. But I want to extend the functionality so that I can search a occurence of a &#039;word&#039; in a &#039;text&#039; field and a &#039;varchar&#039; field. Is there any way this can be achieved with the same functions.

If anyone knows about how to handle the search, kindly mail me.

Regards
Keerthi</description>
		<content:encoded><![CDATA[<p>Hello Dave,</p>
<p>I have been using PATINDEX and CHARINDEX for my project. But I want to extend the functionality so that I can search a occurence of a &#8216;word&#8217; in a &#8216;text&#8217; field and a &#8216;varchar&#8217; field. Is there any way this can be achieved with the same functions.</p>
<p>If anyone knows about how to handle the search, kindly mail me.</p>
<p>Regards<br />
Keerthi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Bransky</title>
		<link>http://blog.sqlauthority.com/2007/04/08/sql-server-search-text-field-charindex-vs-patindex/#comment-3847</link>
		<dc:creator>Alex Bransky</dc:creator>
		<pubDate>Wed, 20 Jun 2007 22:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/04/08/search-text-field-in-sql-server-charindex-vs-patindex/#comment-3847</guid>
		<description>CHARINDEX will only work on a text column if it can implicitly be converted to varchar (or ntext to nvarchar), so if the data is greater than 8000 bytes (approximately) you&#039;ll get an error.</description>
		<content:encoded><![CDATA[<p>CHARINDEX will only work on a text column if it can implicitly be converted to varchar (or ntext to nvarchar), so if the data is greater than 8000 bytes (approximately) you&#8217;ll get an error.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
