Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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


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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.