vwilliams (3/23/2009)
It is taking parameters from an application and getting information to display to an aspx report. The problem is one of the fields (phra_request_querystring) is a string that has to be broken up into several fields to populate the columns within the report, delimited by '&'. The field can vary in content. The column names are included in the string. So it has to also parse the results to get the column name and the value.
A 2 dimensional "array" like that is a virtual piece of cake... please read the following article... there is no need for CROSS APPLY nor even the overhead of a UDF...
http://www.sqlservercentral.com/articles/T-SQL/63003/
--Jeff Moden
Change is inevitable... Change for the better is not.