I am poking around in a database that was created by a company who is a client of ours. We are writing them a web application. I am just doing some simple functions, like implementing a search for data on some of the web pages (enter a last name, and get a grid populated with all matches to that last name).
So I am just poking around at their tables and sprocs. I have never seen this before. Instead of SELECT blah-blah WHERE some-criteria and getting back 106 rows, they added onto the query:
order by codeAnd they get one row of XML. Is this done often? Is it because it is more efficient to parse a string of XML than read through a dataset? (I am not sure where the code is that calls such a sproc, to see how it is handled at the front end).
FOR XML PATH(''),
ROOT('CityAbbreviations')
Thanks.




Reply With Quote