What is Nostr?
Bill Fellows /
npub1c9s…p72p
2023-08-07 18:55:15

Bill Fellows on Nostr: Me reading the docs and applying the syntax to my query. WTF, why doesn't this work? ...

Me reading the docs and applying the syntax to my query. WTF, why doesn't this work?

30 minutes later, having picked the query apart. FINE, let me get on a server with AdventureWorks and run the query from BoL.

The documentation is wrong (or SQL Server behaviour changed between 2012 and now w/r/t subqueries with FOR XML PATH)

Specifically, "Generate a list using PATH mode" the second subquery for ProductNames results in XML safe instead of a merged result as shown https://learn.microsoft.com/en-us/sql/relational-databases/xml/examples-using-path-mode?view=sql-server-ver16#generate-a-value-list-using-path-mode
Author Public Key
npub1c9shmy8un2d3l0up6c9wcz6p2kkzw8v2u5mml5qpklqxhtpjturqzrp72p