Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
Isaac 8/9/2011 7:24:59 AM

How to read an attribute from an XML field in SQL Server 2005

This tip explains how to read an XML attribute from an XML field in sql server. Or, put another way, if we have this data:

<Receivable documentNumber="PYMNT000000000012    " documentDate="12/13/2007">
  <Description />
  <CheckNumber />
  <Items />


We want to use SQL Server 2005 to retrieve the document number (PYMNT000000000012)

The code looks like this:


Version: Unknown or N/A
Section: SQL Scripts

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables