<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Incorrect syntax near '[Insert Arbitrary Column Name]'</title><link>http://blogs.msdn.com/csano/archive/2006/01/18/514429.aspx</link><description>I ran into a rather mysterious error when working with some SQL code today. Incorrect syntax near '[Insert Arbitrary Column Name]' Before I get to the nuts and bolts of the problem, we'll start with some background details. The stored procedure that I</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Incorrect syntax near '[Insert Arbitrary Column Name]'</title><link>http://blogs.msdn.com/csano/archive/2006/01/18/514429.aspx#514478</link><pubDate>Wed, 18 Jan 2006 23:22:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:514478</guid><dc:creator>Brannon</dc:creator><description>Check out the new WITH statement in SQL 2005.&lt;br&gt;&lt;br&gt;You could write your SQL like so:&lt;br&gt;&lt;br&gt;WITH Results AS&lt;br&gt;(&lt;br&gt;    SELECT&lt;br&gt;        ContactId,&lt;br&gt;        FirstName,&lt;br&gt;        MiddleName,&lt;br&gt;        LastName,&lt;br&gt;        ROW_NUMBER() OVER (ORDER BY ContactId ASC) AS RowNumber&lt;br&gt;    FROM&lt;br&gt;        Person.Contact&lt;br&gt;    WHERE&lt;br&gt;        MiddleName IS NOT NULL&lt;br&gt;)&lt;br&gt;SELECT * FROM Results WHERE RowNumber BETWEEN 1 AND 15&lt;br&gt;&lt;br&gt;&lt;br&gt;** I don't have AdventureWorks installed on my SQL 2005 instance, so I couldn't test the exact syntax/query, but it *should* work.&lt;br&gt;&lt;br&gt;-Brannon&lt;br&gt;</description></item><item><title>re: Incorrect syntax near '[Insert Arbitrary Column Name]'</title><link>http://blogs.msdn.com/csano/archive/2006/01/18/514429.aspx#517389</link><pubDate>Wed, 25 Jan 2006 17:40:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:517389</guid><dc:creator>Anonymous</dc:creator><description>Who the heck really wants to read this stuff?  Write about something more interesting!  :)</description></item></channel></rss>