We would like to be able to create a table-valued function on a user defined type. We would like the syntax in SQL to look like it works for the XML nodes function:
DECLARE @myXml XML = '<a><b>1</b><b>2</b><b>3</b></a>' ;
FROM @myXml.nodes('a/b') nodes (node) ;
In other words, in the FROM clause, we can access the "nodes" method of the xml variable and it returns a rowset.
View Complete Post