<?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 for EXEC(@sql)</title>
	<atom:link href="http://www.execsql.com/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://www.execsql.com</link>
	<description>Blogging about SQL Server, SQL XML and related technologies.</description>
	<lastBuildDate>Mon, 13 Feb 2012 08:49:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON. by narendra</title>
		<link>http://www.execsql.com/post/an-explicit-value-for-the-identity-column-in-table-can-only-be-specified-when-a-column-list-is-used-and-identity_insert-is-on#comment-20072</link>
		<dc:creator>narendra</dc:creator>
		<pubDate>Mon, 13 Feb 2012 08:49:43 +0000</pubDate>
		<guid isPermaLink="false">/post/An-explicit-value-for-the-identity-column.aspx#comment-20072</guid>
		<description>I&#039;ve changed key field and place PK as key field.It doesn&#039;t work, again reveals same error. please suggest. An explicit value for the identity column in ‘table’ can only be specified when a column list is used and IDENTITY_INSERT is ON.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve changed key field and place PK as key field.It doesn&#8217;t work, again reveals same error. please suggest. An explicit value for the identity column in ‘table’ can only be specified when a column list is used and IDENTITY_INSERT is ON.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON. by narendra</title>
		<link>http://www.execsql.com/post/an-explicit-value-for-the-identity-column-in-table-can-only-be-specified-when-a-column-list-is-used-and-identity_insert-is-on#comment-20071</link>
		<dc:creator>narendra</dc:creator>
		<pubDate>Mon, 13 Feb 2012 08:48:19 +0000</pubDate>
		<guid isPermaLink="false">/post/An-explicit-value-for-the-identity-column.aspx#comment-20071</guid>
		<description>An explicit value for the identity column in &#039;table&#039; can only be specified when a column list is used and IDENTITY_INSERT is ON.</description>
		<content:encoded><![CDATA[<p>An explicit value for the identity column in &#8216;table&#8217; can only be specified when a column list is used and IDENTITY_INSERT is ON.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bringing a database out of Restoring state in SQL Server 2005 by Stanley Arnold</title>
		<link>http://www.execsql.com/post/bringing-a-database-out-of-restoring-state-in-sql-server-2005#comment-19996</link>
		<dc:creator>Stanley Arnold</dc:creator>
		<pubDate>Wed, 08 Feb 2012 21:50:25 +0000</pubDate>
		<guid isPermaLink="false">/post/Bringing-a-database-out-of-Restoring-state-in-SQL-Server-2005.aspx#comment-19996</guid>
		<description>Thanks for the post. Setup a transaction log backup job using database maintenance. Made the mistake of selecting &quot;Back up the tail of the log, and leave the database in the restoring state&quot; This left all the database in the restoring state after the first execution of the log backup. The RESTORE Database WITH RECOVERY resolved the issue.</description>
		<content:encoded><![CDATA[<p>Thanks for the post. Setup a transaction log backup job using database maintenance. Made the mistake of selecting &#8220;Back up the tail of the log, and leave the database in the restoring state&#8221; This left all the database in the restoring state after the first execution of the log backup. The RESTORE Database WITH RECOVERY resolved the issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bringing a database out of Restoring state in SQL Server 2005 by Kiran</title>
		<link>http://www.execsql.com/post/bringing-a-database-out-of-restoring-state-in-sql-server-2005#comment-19955</link>
		<dc:creator>Kiran</dc:creator>
		<pubDate>Mon, 06 Feb 2012 15:40:48 +0000</pubDate>
		<guid isPermaLink="false">/post/Bringing-a-database-out-of-Restoring-state-in-SQL-Server-2005.aspx#comment-19955</guid>
		<description>super!!!! amazing tip...worked like a charm..</description>
		<content:encoded><![CDATA[<p>super!!!! amazing tip&#8230;worked like a charm..</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bringing a database out of Restoring state in SQL Server 2005 by Allan S. Hansen</title>
		<link>http://www.execsql.com/post/bringing-a-database-out-of-restoring-state-in-sql-server-2005#comment-19777</link>
		<dc:creator>Allan S. Hansen</dc:creator>
		<pubDate>Sun, 29 Jan 2012 07:08:29 +0000</pubDate>
		<guid isPermaLink="false">/post/Bringing-a-database-out-of-Restoring-state-in-SQL-Server-2005.aspx#comment-19777</guid>
		<description>Sounds like you&#039;re trying to restore a backup with the log files missing or incomplete.</description>
		<content:encoded><![CDATA[<p>Sounds like you&#8217;re trying to restore a backup with the log files missing or incomplete.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bringing a database out of Restoring state in SQL Server 2005 by channa</title>
		<link>http://www.execsql.com/post/bringing-a-database-out-of-restoring-state-in-sql-server-2005#comment-19775</link>
		<dc:creator>channa</dc:creator>
		<pubDate>Sun, 29 Jan 2012 03:15:10 +0000</pubDate>
		<guid isPermaLink="false">/post/Bringing-a-database-out-of-Restoring-state-in-SQL-Server-2005.aspx#comment-19775</guid>
		<description>unluck for me. I got &quot;The database cannot be recovered because the log was not restore&quot;</description>
		<content:encoded><![CDATA[<p>unluck for me. I got &#8220;The database cannot be recovered because the log was not restore&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bringing a database out of Restoring state in SQL Server 2005 by Radames Ortega</title>
		<link>http://www.execsql.com/post/bringing-a-database-out-of-restoring-state-in-sql-server-2005#comment-19702</link>
		<dc:creator>Radames Ortega</dc:creator>
		<pubDate>Wed, 25 Jan 2012 15:44:05 +0000</pubDate>
		<guid isPermaLink="false">/post/Bringing-a-database-out-of-Restoring-state-in-SQL-Server-2005.aspx#comment-19702</guid>
		<description>Thank you for posting this!!</description>
		<content:encoded><![CDATA[<p>Thank you for posting this!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop User: The database principal owns a schema in the database, and cannot be dropped by Matias</title>
		<link>http://www.execsql.com/post/drop-user-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped#comment-19641</link>
		<dc:creator>Matias</dc:creator>
		<pubDate>Mon, 23 Jan 2012 15:26:38 +0000</pubDate>
		<guid isPermaLink="false">/post/The-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped.aspx#comment-19641</guid>
		<description>10 puntos master</description>
		<content:encoded><![CDATA[<p>10 puntos master</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Filter parameters in a Stored Procedure by Simon</title>
		<link>http://www.execsql.com/post/filter-parameters-in-a-stored-procedure#comment-19424</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Fri, 13 Jan 2012 11:44:16 +0000</pubDate>
		<guid isPermaLink="false">/post/Filter-parameters-in-a-Stored-Procedure.aspx#comment-19424</guid>
		<description>This is a neat solution to an issue I&#039;d come to think of as just a fact of life.  If an OR/M such as LINQ to SQL is not an option, it has the potential to greatly simplify the DAL in a situation where you wish to use stored procedures and filter in the DB rather than retireve all data and filter in the application.

However, there is a stumbling block.  You wrote:

&quot;Of course, me using &lt;= is basically irrelevant, as any logical operation can be performed within the second part of the OR statement.&quot;

Whilst any logical operation can be performed, what do you think is the neatest way of achieving this.  e.g. in the first call to the SPROC I may want to retrieve all Products with a length less than 10.  However, the next query may want all products with a length greater than 15, or equal to 20.  I can&#039;t think of a tidy way of specifying the operator to use.

One solution I thought of would be to have a different variable for each operator, ie.

@LengthLT INT = NULL
@LengthEQ INT = NULL
@LengthGT = NULL

You would then supply the @LengthLT variable if you wanted Products with length less than your value, @LengthEQ for equal to etc.  However, it makes the code start to look really messy as you then have a whole lot more variables to test.

I realise I&#039;m replying to a three year old post, but if you happen to have an idea up your sleeve, or someone else stumbles upon this, I&#039;d love to have your thoughts on it.

Thanks
Simon</description>
		<content:encoded><![CDATA[<p>This is a neat solution to an issue I&#8217;d come to think of as just a fact of life.  If an OR/M such as LINQ to SQL is not an option, it has the potential to greatly simplify the DAL in a situation where you wish to use stored procedures and filter in the DB rather than retireve all data and filter in the application.</p>
<p>However, there is a stumbling block.  You wrote:</p>
<p>&#8220;Of course, me using &lt;= is basically irrelevant, as any logical operation can be performed within the second part of the OR statement.&quot;</p>
<p>Whilst any logical operation can be performed, what do you think is the neatest way of achieving this.  e.g. in the first call to the SPROC I may want to retrieve all Products with a length less than 10.  However, the next query may want all products with a length greater than 15, or equal to 20.  I can&#039;t think of a tidy way of specifying the operator to use.</p>
<p>One solution I thought of would be to have a different variable for each operator, ie.</p>
<p>@LengthLT INT = NULL<br />
@LengthEQ INT = NULL<br />
@LengthGT = NULL</p>
<p>You would then supply the @LengthLT variable if you wanted Products with length less than your value, @LengthEQ for equal to etc.  However, it makes the code start to look really messy as you then have a whole lot more variables to test.</p>
<p>I realise I&#039;m replying to a three year old post, but if you happen to have an idea up your sleeve, or someone else stumbles upon this, I&#039;d love to have your thoughts on it.</p>
<p>Thanks<br />
Simon</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Drop User: The database principal owns a schema in the database, and cannot be dropped by Rajkumar</title>
		<link>http://www.execsql.com/post/drop-user-the-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped#comment-18767</link>
		<dc:creator>Rajkumar</dc:creator>
		<pubDate>Thu, 15 Dec 2011 13:13:19 +0000</pubDate>
		<guid isPermaLink="false">/post/The-database-principal-owns-a-schema-in-the-database-and-cannot-be-dropped.aspx#comment-18767</guid>
		<description>Thank a lot , you just saved me...Great Job</description>
		<content:encoded><![CDATA[<p>Thank a lot , you just saved me&#8230;Great Job</p>
]]></content:encoded>
	</item>
</channel>
</rss>

