<?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; Guidelines and Coding Standards Part &#8211; 2</title>
	<atom:link href="http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 23 May 2013 14:22:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Nicola</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-259745</link>
		<dc:creator><![CDATA[Nicola]]></dc:creator>
		<pubDate>Mon, 05 Mar 2012 14:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-259745</guid>
		<description><![CDATA[Hi Pinal and thanks for sharing. 
One thing: I found the example on &quot;If there is no need of resultset then use syntax that doesn’t return a resultset.&quot; misleading.
The two query aren&#039;t equivalent because the second &quot;if exists (select count ...&quot; if alsways true.
You probably should change it to &quot;if (select count...) &gt; 0&quot;, it makes more sense to me.
Anyway I agree with the suggestion - I usually use &quot;if exists (select * ...) &quot; because I found that sql server ignores the list of fields.
thanks]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal and thanks for sharing.<br />
One thing: I found the example on &#8220;If there is no need of resultset then use syntax that doesn’t return a resultset.&#8221; misleading.<br />
The two query aren&#8217;t equivalent because the second &#8220;if exists (select count &#8230;&#8221; if alsways true.<br />
You probably should change it to &#8220;if (select count&#8230;) &gt; 0&#8243;, it makes more sense to me.<br />
Anyway I agree with the suggestion &#8211; I usually use &#8220;if exists (select * &#8230;) &#8221; because I found that sql server ignores the list of fields.<br />
thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-212189</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Tue, 06 Dec 2011 16:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-212189</guid>
		<description><![CDATA[Thanks to Aaron Bertrand for their feedback in correcting few of the incorrect information. I request you to read his excellent article here - http://sqlblog.com/blogs/aaron_bertrand/archive/2008/10/30/my-stored-procedure-best-practices-checklist.aspx for Best Practices Checklist.]]></description>
		<content:encoded><![CDATA[<p>Thanks to Aaron Bertrand for their feedback in correcting few of the incorrect information. I request you to read his excellent article here &#8211; <a href="http://sqlblog.com/blogs/aaron_bertrand/archive/2008/10/30/my-stored-procedure-best-practices-checklist.aspx" rel="nofollow">http://sqlblog.com/blogs/aaron_bertrand/archive/2008/10/30/my-stored-procedure-best-practices-checklist.aspx</a> for Best Practices Checklist.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-92524</link>
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 13 Oct 2010 11:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-92524</guid>
		<description><![CDATA[Pinal, 

I&#039;ve been following your blog for quite a while now and have great respect for you but I&#039;d like to ask why you recommend the use of @@ERROR after transaction blocks instead of using a BEGIN/END TRY;  BEGIN/END CATCH; and checking the errors from within there. 

I notice that this thread is very old and I guess you just haven&#039;t updated it or am I missing a trick?

Cheers

Chris]]></description>
		<content:encoded><![CDATA[<p>Pinal, </p>
<p>I&#8217;ve been following your blog for quite a while now and have great respect for you but I&#8217;d like to ask why you recommend the use of @@ERROR after transaction blocks instead of using a BEGIN/END TRY;  BEGIN/END CATCH; and checking the errors from within there. </p>
<p>I notice that this thread is very old and I guess you just haven&#8217;t updated it or am I missing a trick?</p>
<p>Cheers</p>
<p>Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ROBIN THOMAS</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-89397</link>
		<dc:creator><![CDATA[ROBIN THOMAS]]></dc:creator>
		<pubDate>Sat, 25 Sep 2010 12:32:53 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-89397</guid>
		<description><![CDATA[Sir,


I have a question about the LIKE keyword..

I have 1 table named tbl1 and a column in it is Discount.

in the discount column may contain a &#039;%&#039; symbol (not necessary. Eg: 10%,100Rs)

How can I find all values that contain the character &#039;%&#039; using LIKE operator?]]></description>
		<content:encoded><![CDATA[<p>Sir,</p>
<p>I have a question about the LIKE keyword..</p>
<p>I have 1 table named tbl1 and a column in it is Discount.</p>
<p>in the discount column may contain a &#8216;%&#8217; symbol (not necessary. Eg: 10%,100Rs)</p>
<p>How can I find all values that contain the character &#8216;%&#8217; using LIKE operator?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vivek k singh</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-85687</link>
		<dc:creator><![CDATA[vivek k singh]]></dc:creator>
		<pubDate>Mon, 30 Aug 2010 21:09:18 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-85687</guid>
		<description><![CDATA[very nice blog , All thing s is diffrent from another and which is helpfull all persons............

very thank&#039;s pinal sir]]></description>
		<content:encoded><![CDATA[<p>very nice blog , All thing s is diffrent from another and which is helpfull all persons&#8230;&#8230;&#8230;&#8230;</p>
<p>very thank&#8217;s pinal sir</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Venkatesan</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-84187</link>
		<dc:creator><![CDATA[Venkatesan]]></dc:creator>
		<pubDate>Sun, 15 Aug 2010 14:37:26 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-84187</guid>
		<description><![CDATA[nice blog Awsome ....................]]></description>
		<content:encoded><![CDATA[<p>nice blog Awsome &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilesh Shinde</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-83590</link>
		<dc:creator><![CDATA[Nilesh Shinde]]></dc:creator>
		<pubDate>Tue, 10 Aug 2010 12:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-83590</guid>
		<description><![CDATA[Really helpful to implement Best Practices]]></description>
		<content:encoded><![CDATA[<p>Really helpful to implement Best Practices</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sagar</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-66196</link>
		<dc:creator><![CDATA[Sagar]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 10:47:36 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-66196</guid>
		<description><![CDATA[asum best practices]]></description>
		<content:encoded><![CDATA[<p>asum best practices</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madeshwaran</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-52894</link>
		<dc:creator><![CDATA[Madeshwaran]]></dc:creator>
		<pubDate>Tue, 09 Jun 2009 23:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-52894</guid>
		<description><![CDATA[I recently came to know your blog. Very good blog..]]></description>
		<content:encoded><![CDATA[<p>I recently came to know your blog. Very good blog..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajgopal</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-45389</link>
		<dc:creator><![CDATA[Rajgopal]]></dc:creator>
		<pubDate>Tue, 06 Jan 2009 06:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-45389</guid>
		<description><![CDATA[Dear Pinal,

Recently, i came to know about your blog.  Lot of information gathered by me going through your site.  Awsome!!!!.  

I need to know more about cluster services and replication services offered by SQL 2005.  Effective use of both, advantages and disadvantages.

Thanks and regards

Rajgopal]]></description>
		<content:encoded><![CDATA[<p>Dear Pinal,</p>
<p>Recently, i came to know about your blog.  Lot of information gathered by me going through your site.  Awsome!!!!.  </p>
<p>I need to know more about cluster services and replication services offered by SQL 2005.  Effective use of both, advantages and disadvantages.</p>
<p>Thanks and regards</p>
<p>Rajgopal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parikshit Nemade</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-44383</link>
		<dc:creator><![CDATA[Parikshit Nemade]]></dc:creator>
		<pubDate>Tue, 25 Nov 2008 10:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-44383</guid>
		<description><![CDATA[Very nice and helpfull articles.]]></description>
		<content:encoded><![CDATA[<p>Very nice and helpfull articles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bijoy</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-43506</link>
		<dc:creator><![CDATA[Bijoy]]></dc:creator>
		<pubDate>Sat, 04 Oct 2008 11:15:37 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-43506</guid>
		<description><![CDATA[i want to create a function which returns the following.
yyyyddmm#####
can you please help me out....

CREATE FUNCTION dbo.AutoGenerateID
	(
	
	@UserId char(15)
	
	)
RETURNS char(15)
AS
begin
	declare @date_extract char(8)
	declare @id_extract char(10)
	declare @max_id char(20)
	declare @userid1 char(15)
	declare @id_size char(10)			
	declare @temp1 char(15)
	declare @data char(10)
		
	set @max_id =  @userid

	set @date_extract = left(@max_id,8)
	set @id_size = LEN(@max_id) - LEN(@date_extract)
	set @id_extract = right(@max_id,@id_size)
	
	set @data = convert(varchar,getdate(),112)

	if ( @data = @date_extract) 
		 set @id_extract = id_extract + 1
	else
		set @id_extract = concat((repeat(&#039;0&#039;,@id_size-1)),&#039;1&#039;)
		set @date_extract = date
	end if
	set @userid1 = concat(@date_extract, @id_extract)
	set @temp1 = LEN(@max_id)-(LEN(@userid1))

	set @userid1 = concat(@date_extract,concat(repeat(&#039;0&#039;,@temp1),@id_extract))
	
	return @userid1
	
	GO]]></description>
		<content:encoded><![CDATA[<p>i want to create a function which returns the following.<br />
yyyyddmm#####<br />
can you please help me out&#8230;.</p>
<p>CREATE FUNCTION dbo.AutoGenerateID<br />
	(</p>
<p>	@UserId char(15)</p>
<p>	)<br />
RETURNS char(15)<br />
AS<br />
begin<br />
	declare @date_extract char(8)<br />
	declare @id_extract char(10)<br />
	declare @max_id char(20)<br />
	declare @userid1 char(15)<br />
	declare @id_size char(10)<br />
	declare @temp1 char(15)<br />
	declare @data char(10)</p>
<p>	set @max_id =  @userid</p>
<p>	set @date_extract = left(@max_id,8)<br />
	set @id_size = LEN(@max_id) &#8211; LEN(@date_extract)<br />
	set @id_extract = right(@max_id,@id_size)</p>
<p>	set @data = convert(varchar,getdate(),112)</p>
<p>	if ( @data = @date_extract)<br />
		 set @id_extract = id_extract + 1<br />
	else<br />
		set @id_extract = concat((repeat(&#8217;0&#8242;,@id_size-1)),&#8217;1&#8242;)<br />
		set @date_extract = date<br />
	end if<br />
	set @userid1 = concat(@date_extract, @id_extract)<br />
	set @temp1 = LEN(@max_id)-(LEN(@userid1))</p>
<p>	set @userid1 = concat(@date_extract,concat(repeat(&#8217;0&#8242;,@temp1),@id_extract))</p>
<p>	return @userid1</p>
<p>	GO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Guidelines and Coding Standards Complete List Download Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-43353</link>
		<dc:creator><![CDATA[SQL SERVER - Guidelines and Coding Standards Complete List Download Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Mon, 29 Sep 2008 05:45:31 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-43353</guid>
		<description><![CDATA[[...] SQL SERVER - Guidelines and Coding Standards Part - 2 [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER &#8211; Guidelines and Coding Standards Part &#8211; 2 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iliad</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-43236</link>
		<dc:creator><![CDATA[iliad]]></dc:creator>
		<pubDate>Thu, 25 Sep 2008 09:52:10 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-43236</guid>
		<description><![CDATA[pinal AND stephen, THANKS FOR your comments.]]></description>
		<content:encoded><![CDATA[<p>pinal AND stephen, THANKS FOR your comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-43205</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Wed, 24 Sep 2008 11:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-43205</guid>
		<description><![CDATA[@iliad,

Yes, It is quite common to use Keywords in UPPER CASE.

It may be difficult to write and read in beggining but after a while it becomes second nature.

@Stephen,

I usually answer questions through email if I think it will be not useful to others.

If I think it is useful to everyone I post on blog.

Kind Regards,
Pinal Dave ( http://www.SQLAuthority.com )]]></description>
		<content:encoded><![CDATA[<p>@iliad,</p>
<p>Yes, It is quite common to use Keywords in UPPER CASE.</p>
<p>It may be difficult to write and read in beggining but after a while it becomes second nature.</p>
<p>@Stephen,</p>
<p>I usually answer questions through email if I think it will be not useful to others.</p>
<p>If I think it is useful to everyone I post on blog.</p>
<p>Kind Regards,<br />
Pinal Dave ( <a href="http://www.SQLAuthority.com" rel="nofollow">http://www.SQLAuthority.com</a> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Hill</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-43204</link>
		<dc:creator><![CDATA[Stephen Hill]]></dc:creator>
		<pubDate>Wed, 24 Sep 2008 11:16:15 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-43204</guid>
		<description><![CDATA[@Iliad: I don&#039;t think the author of this blog ever reads his comments so I would expect a response.

I agree with what your saying though, even then typing in caps is the correct way to do it, I perfer to type my Sql in PascalCase so that it matches the style of my other languages.]]></description>
		<content:encoded><![CDATA[<p>@Iliad: I don&#8217;t think the author of this blog ever reads his comments so I would expect a response.</p>
<p>I agree with what your saying though, even then typing in caps is the correct way to do it, I perfer to type my Sql in PascalCase so that it matches the style of my other languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: iliad</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-43203</link>
		<dc:creator><![CDATA[iliad]]></dc:creator>
		<pubDate>Wed, 24 Sep 2008 09:42:31 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-43203</guid>
		<description><![CDATA[I&#039;m just starting with T-SQL, so this series is the right guide at the right time. Thanks a lot!

I have one question. Do you really write all the SQL language keywords like (SELECT, FROM, JOIN, ON,...) with capital letters? From my newbie perspective this is 1) quite tiring to write; and 2) quite tiring to read. My eyes and fingers don&#039;t like it.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m just starting with T-SQL, so this series is the right guide at the right time. Thanks a lot!</p>
<p>I have one question. Do you really write all the SQL language keywords like (SELECT, FROM, JOIN, ON,&#8230;) with capital letters? From my newbie perspective this is 1) quite tiring to write; and 2) quite tiring to read. My eyes and fingers don&#8217;t like it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jahedur Rahman</title>
		<link>http://blog.sqlauthority.com/2008/09/24/sql-server-coding-standards-guidelines-part-2/#comment-43192</link>
		<dc:creator><![CDATA[Jahedur Rahman]]></dc:creator>
		<pubDate>Wed, 24 Sep 2008 04:34:16 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1110#comment-43192</guid>
		<description><![CDATA[I just came to know about your blog and became fan of your articles. I began to read previous posts. Thanks for your nice and helpful articles.]]></description>
		<content:encoded><![CDATA[<p>I just came to know about your blog and became fan of your articles. I began to read previous posts. Thanks for your nice and helpful articles.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
