When I run the queries presented from page 87 - 89 I run into problems. The issue is that none of the Sales Order IDs are showing up in any record past Customer ID 20777. I can query them from out just fine with SQL, but when I use the FOR XML EXPLICIT to get them they do not show up. Here's what comes out from my query as it is written from page 87 - 88.
Code:
<sc CustomerID="29484">
<pp LastName="Achong" FirstName="Gustavo" />
</sc>
<sc CustomerID="29485">
<pp LastName="Abel" FirstName="Catherine" />
</sc>
The craziest thing about this is that I can run a standard query on everything past ID 20777 and get the SalesOrderID and OrderDate information, but when I try to get it out this way it will not.
So, to recap, everything before Customer ID 20777 will drop the appropriate elements, but nothing shows for any record past that. This is the case even when I query FOR XML EXPLICIT only for a single Customer ID.