<?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>Jonathan J. Kingsbury &#187; converting sql error</title>
	<atom:link href="http://www.jon-kingsbury.com/tag/converting-sql-error/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jon-kingsbury.com</link>
	<description>Founder of DefendingTheTruth.com - Systems Analyst at Blue Robin, Inc.</description>
	<lastBuildDate>Tue, 24 Jan 2012 15:56:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Conversion failed when converting the nvarchar value &#8216;X,X&#8217; to data type int.</title>
		<link>http://www.jon-kingsbury.com/2009/12/10/conversion-failed-when-converting-the-nvarchar-value-xx-to-data-type-int/</link>
		<comments>http://www.jon-kingsbury.com/2009/12/10/conversion-failed-when-converting-the-nvarchar-value-xx-to-data-type-int/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 18:17:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ramblings]]></category>
		<category><![CDATA[conversion failed]]></category>
		<category><![CDATA[converting sql error]]></category>
		<category><![CDATA[data type int]]></category>
		<category><![CDATA[nvarchar value]]></category>

		<guid isPermaLink="false">http://www.jon-kingsbury.com/2009/12/10/conversion-failed-when-converting-the-nvarchar-value-xx-to-data-type-int/</guid>
		<description><![CDATA[I decided to share this information on the web as I&#8217;ve visited many sources where the workaround for the conversation<a href="http://www.jon-kingsbury.com/2009/12/10/conversion-failed-when-converting-the-nvarchar-value-xx-to-data-type-int/" class="searchmore">Read the Rest...</a><div class="clr"></div>]]></description>
			<content:encoded><![CDATA[<p>I decided to share this information on the web as I&#8217;ve visited many sources where the workaround for the conversation failed sql error is not entirely accurate.</p>
<p>If you receive this ASP error, it&#8217;s probably due to the fact that you are trying to return a list of results where the declared variable in your if statement = a certain interger value. Depending on who designed the table structure and relations in a SQL database, you cannot declare this statement if your data contains symbol(s) such as a comma (which was used to relate your record with other records).</p>
<p>To resolve this issue, simply use the SQL LIKE clause as well as including percentages %variablename% around the variable in cases where the identifier is greater than 2 digits in length (i.e. id=1,3,12,15,233). Now when you execute the sql statement, whatever value is in your variablename (example 15), only records will display that contain the number 15 (exactly 2 digits long). The commas used to seperate your related ID&#8217;s will be ignored in this case..</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jon-kingsbury.com/2009/12/10/conversion-failed-when-converting-the-nvarchar-value-xx-to-data-type-int/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

