 




<?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: SP Dynamic SQL with LIKE Operator</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/sp-dynamic-sql-with-like-operater/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/sp-dynamic-sql-with-like-operater/</link>
	<description></description>
	<lastBuildDate>Wed, 22 May 2013 02:14:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: eabouzeid</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sp-dynamic-sql-with-like-operater/#comment-77958</link>
		<dc:creator>eabouzeid</dc:creator>
		<pubDate>Tue, 08 Jun 2010 19:26:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-77958</guid>
		<description><![CDATA[Thank you for your help. I tried what you wrote and it worked just fine. Another solution I found that worked was this modification:

CREATE PROCEDURE SPFIND
@VARIABLE1 VARCHAR(20)
SELECT *
FROM TABLE1
WHERE FIELD1 LIKE LIKE &#039;%&#039; + @VARIABLE1+ &#039;%&#039;

Then to execute I would just pass the variable like this:
EXEC VARIABLENAME]]></description>
		<content:encoded><![CDATA[<p>Thank you for your help. I tried what you wrote and it worked just fine. Another solution I found that worked was this modification:</p>
<p>CREATE PROCEDURE SPFIND<br />
@VARIABLE1 VARCHAR(20)<br />
SELECT *<br />
FROM TABLE1<br />
WHERE FIELD1 LIKE LIKE &#8216;%&#8217; + @VARIABLE1+ &#8216;%&#8217;</p>
<p>Then to execute I would just pass the variable like this:<br />
EXEC VARIABLENAME</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eabouzeid</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sp-dynamic-sql-with-like-operater/#comment-77888</link>
		<dc:creator>eabouzeid</dc:creator>
		<pubDate>Mon, 07 Jun 2010 13:34:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-77888</guid>
		<description><![CDATA[No. I just don&#039;t get any results. The only way I&#039;m able to get results is if I execute the stored procedure as shown below:

EXEC spFIND @variable1=&#039;%variablename&#039;

I think it should work by simply saying EXEC spFIND @variable1=&#039;variablename&#039;]]></description>
		<content:encoded><![CDATA[<p>No. I just don&#8217;t get any results. The only way I&#8217;m able to get results is if I execute the stored procedure as shown below:</p>
<p>EXEC spFIND @variable1=&#8217;%variablename&#8217;</p>
<p>I think it should work by simply saying EXEC spFIND @variable1=&#8217;variablename&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: meandyou</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/sp-dynamic-sql-with-like-operater/#comment-77886</link>
		<dc:creator>meandyou</dc:creator>
		<pubDate>Mon, 07 Jun 2010 13:20:14 +0000</pubDate>
		<guid isPermaLink="false">#comment-77886</guid>
		<description><![CDATA[Are you getting an error?  What is the error?  
OR
does it just seem to run forever?]]></description>
		<content:encoded><![CDATA[<p>Are you getting an error?  What is the error?<br />
OR<br />
does it just seem to run forever?</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 3/10 queries in 0.043 seconds using memcached
Object Caching 295/301 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-22 03:18:13 -->