<?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: Add Primary Key</title>
	<atom:link href="http://sqlserverplanet.com/ddl/add-primary-key/feed" rel="self" type="application/rss+xml" />
	<link>http://sqlserverplanet.com/ddl/add-primary-key</link>
	<description>Tips and Articles on SQL Server</description>
	<lastBuildDate>Mon, 06 Feb 2012 13:36:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Praveen Yadav</title>
		<link>http://sqlserverplanet.com/ddl/add-primary-key/comment-page-1#comment-510</link>
		<dc:creator>Praveen Yadav</dc:creator>
		<pubDate>Fri, 25 Feb 2011 12:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=835#comment-510</guid>
		<description>Hi Sachan,

   I Am able to insert the string you have given.See except single quoute no character will cause problem inserting a string
I will suggest you one technique which may help you to over come this single quote problem.

1.First  you add some other special charecters(eg : *,# etc ) in the the place of single qoute,except at the beginning and end.

2.Then execute the below query
   Insert into TableName Values(&#039; Hi,I*AM FINE ,TIME IS NOW 8:30,&quot;PRAVEEN&quot;,IT*S MINE....!@#^#$%^&amp;() etc... &#039;)
  Update  TableName
    Set ColumnName=Replace(ColumnName,&#039;*&#039;,&#039;&#039;&#039;&#039;)

Please note that Your column&#039;s actual value sholud not contain
the special character.Or else use a string  and replace it later.In the Above case i am using * Which my actual string not having.

Eg:
   Insert into TableName Values(&#039; Hi,IsinglequoteAM FINE ,TIME IS NOW 8:30,&quot;PRAVEEN&quot;,ITsinglequoteS MINE....!@#^#$%^&amp;() etc... &#039;)
  Update  TableName
    Set ColumnName=Replace(ColumnName,&#039;singlequote&#039;,&#039;&#039;&#039;&#039;)

Hope this problem is ends here.

Best Regards
P.Praveen Yadav</description>
		<content:encoded><![CDATA[<p>Hi Sachan,</p>
<p>   I Am able to insert the string you have given.See except single quoute no character will cause problem inserting a string<br />
I will suggest you one technique which may help you to over come this single quote problem.</p>
<p>1.First  you add some other special charecters(eg : *,# etc ) in the the place of single qoute,except at the beginning and end.</p>
<p>2.Then execute the below query<br />
   Insert into TableName Values(&#8216; Hi,I*AM FINE ,TIME IS NOW 8:30,&#8221;PRAVEEN&#8221;,IT*S MINE&#8230;.!@#^#$%^&amp;() etc&#8230; &#8216;)<br />
  Update  TableName<br />
    Set ColumnName=Replace(ColumnName,&#8217;*',&#8221;&#8221;)</p>
<p>Please note that Your column&#8217;s actual value sholud not contain<br />
the special character.Or else use a string  and replace it later.In the Above case i am using * Which my actual string not having.</p>
<p>Eg:<br />
   Insert into TableName Values(&#8216; Hi,IsinglequoteAM FINE ,TIME IS NOW 8:30,&#8221;PRAVEEN&#8221;,ITsinglequoteS MINE&#8230;.!@#^#$%^&amp;() etc&#8230; &#8216;)<br />
  Update  TableName<br />
    Set ColumnName=Replace(ColumnName,&#8217;singlequote&#8217;,&#8221;&#8221;)</p>
<p>Hope this problem is ends here.</p>
<p>Best Regards<br />
P.Praveen Yadav</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: P.K. Sachan</title>
		<link>http://sqlserverplanet.com/ddl/add-primary-key/comment-page-1#comment-506</link>
		<dc:creator>P.K. Sachan</dc:creator>
		<pubDate>Fri, 25 Feb 2011 07:26:15 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=835#comment-506</guid>
		<description>Hi Praveen

Please tell me query to insert this string...   &#039;13F6789&#039;\&#039;28/12/2010 04:15:02 PM&#039;\1202\556,&#039;I011&#039;,RSE58043,1,&#039;28/12/2010 04:15:02 PM&#039;,Secure_3Ph4W_XXXX,Secure,725559555,6.44,6.45,6.45,0.001,0.00,0.00,0.00,0,0.000,0.000,0.001,1.000,1.000,1.000,1.000,0.0,0.0,0.1,49.69,15,0,15,0,7,0,19,0,98390,1057535,0,</description>
		<content:encoded><![CDATA[<p>Hi Praveen</p>
<p>Please tell me query to insert this string&#8230;   &#8217;13F6789&#8242;\&#8217;28/12/2010 04:15:02 PM&#8217;\1202\556,&#8217;I011&#8242;,RSE58043,1,&#8217;28/12/2010 04:15:02 PM&#8217;,Secure_3Ph4W_XXXX,Secure,725559555,6.44,6.45,6.45,0.001,0.00,0.00,0.00,0,0.000,0.000,0.001,1.000,1.000,1.000,1.000,0.0,0.0,0.1,49.69,15,0,15,0,7,0,19,0,98390,1057535,0,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: P.K. Sachan</title>
		<link>http://sqlserverplanet.com/ddl/add-primary-key/comment-page-1#comment-503</link>
		<dc:creator>P.K. Sachan</dc:creator>
		<pubDate>Mon, 21 Feb 2011 13:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=835#comment-503</guid>
		<description>Hi Praveen Yadav

         you are right.. we can do it by replacing &#039;Odd&#039; Single Quotes into &#039;Even&#039; Single Quotes and placing    Double quotes at the beginning and at end of String...Thank you Very Much

Thanks &amp; Regards
Piyush Kr. Sachan</description>
		<content:encoded><![CDATA[<p>Hi Praveen Yadav</p>
<p>         you are right.. we can do it by replacing &#8216;Odd&#8217; Single Quotes into &#8216;Even&#8217; Single Quotes and placing    Double quotes at the beginning and at end of String&#8230;Thank you Very Much</p>
<p>Thanks &amp; Regards<br />
Piyush Kr. Sachan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen Yadav</title>
		<link>http://sqlserverplanet.com/ddl/add-primary-key/comment-page-1#comment-491</link>
		<dc:creator>Praveen Yadav</dc:creator>
		<pubDate>Wed, 16 Feb 2011 12:49:56 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=835#comment-491</guid>
		<description>Hi Sachan,

I am not clear abt ur requirement. I think the prob must be with quotes

To insert a string directly into a varchar field,first you should
open two single quotes, like &#039; &#039;,then you can add any any any values inside that quotes including double quotes.But if you want to add a single quote you must have to add two single quotes.

Hope that it will help you if not,plz describe your prob , i will try my best to solve it.

Best Regrds
Praveen Yadav</description>
		<content:encoded><![CDATA[<p>Hi Sachan,</p>
<p>I am not clear abt ur requirement. I think the prob must be with quotes</p>
<p>To insert a string directly into a varchar field,first you should<br />
open two single quotes, like &#8216; &#8216;,then you can add any any any values inside that quotes including double quotes.But if you want to add a single quote you must have to add two single quotes.</p>
<p>Hope that it will help you if not,plz describe your prob , i will try my best to solve it.</p>
<p>Best Regrds<br />
Praveen Yadav</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: P.K. Sachan</title>
		<link>http://sqlserverplanet.com/ddl/add-primary-key/comment-page-1#comment-490</link>
		<dc:creator>P.K. Sachan</dc:creator>
		<pubDate>Tue, 15 Feb 2011 05:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://sqlserverplanet.com/?p=835#comment-490</guid>
		<description>Hi Praveen

          
         I think some thing mismatch to understand. its creating prob at &quot;Set&quot;..
         Actualy this string have none specified single quotes or double quotes, they may be even or odd..example like 1 or 4 or 7 or 8 single quotes and like single quote its may be double quotes. String also may have function like max,min,as,...----&gt;DSAD”&quot;FDF min ’SDF’”SD’AS””FSAS’ MAX DDFDFDFDSDFSDF</description>
		<content:encoded><![CDATA[<p>Hi Praveen</p>
<p>         I think some thing mismatch to understand. its creating prob at &#8220;Set&#8221;..<br />
         Actualy this string have none specified single quotes or double quotes, they may be even or odd..example like 1 or 4 or 7 or 8 single quotes and like single quote its may be double quotes. String also may have function like max,min,as,&#8230;&#8212;-&gt;DSAD”&#8221;FDF min ’SDF’”SD’AS””FSAS’ MAX DDFDFDFDSDFSDF</p>
]]></content:encoded>
	</item>
</channel>
</rss>

