romah (3/14/2013)
I found in other forums that "cross apply" only works if the compatibility_level is greater than 80.When I checked the compatibility_level of our database, it's 80.
SELECT compatibility_level
FROM sys.databases WHERE name = 'database_name'
I think Eugene's solution works in greater compatibility-level but I don't have permission to change it.
Thanks once again Eugene !:-)
NP. I am, however, concerned that Eugene is correct about the future. Please post your fnSplit function (ironically named) and lets see if we can make this code a bit more bullte proof for the future scalability..
--Jeff Moden
Change is inevitable... Change for the better is not.