Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 Discuss the book Beginning Microsoft SQL Server 2008 Programming, Robert Vieira, ISBN: 978-0-470-25701-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 15th, 2012, 09:14 AM
Authorized User
Points: 285, Level: 5
Points: 285, Level: 5 Points: 285, Level: 5 Points: 285, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2010
Posts: 71
Thanks: 12
Thanked 0 Times in 0 Posts
Default SQL doesn't accept FOR XML PATH syntax...

Hi guys,

I am using Management Studio 2008 and trying to write a query using FOR XML PATH. But the the word PATH is throwing an error! Here is my code:

Code:
SELECT Id, Name AS "Submitters Name", SubmissionDate AS 'Submission Date', Book, ChangeName AS 'Change Name', ModificationChange AS 'Modification / Change', Priority, Month

FROM [dbo].[ChangeRequest]
  FOR
  XML PATH
The error is throws is here:

Code:
Msg 170, Level 15, State 1, Line 6
Line 6: Incorrect syntax near 'PATH'.
ANy thoughts as to why? I am using the book MSSQL Server 2008 Programming and this uses the code above. So why doesn't it work on my MSSQL MS?

Best

Lee
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get full path of an XML node? swheeler XML 1 December 11th, 2009 05:28 AM
SQL Server 2005 XML: FOR XML PATH -> cdata? stoves SQL Server 2005 1 July 8th, 2008 02:40 AM
Retrieve numbered node path from xml jeft0nes XSLT 6 July 20th, 2007 03:59 PM
value from a xml path in a variable ?? TPP XSLT 2 June 23rd, 2006 03:11 AM
restrict the uploaded file to ACCEPT ONLY XML FIL ruchilalla J2EE 3 April 29th, 2005 07:19 AM



All times are GMT -4. The time now is 11:46 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.