The reason for wanting it in a stored procedure is that my table structure is still somewhat dynamic... and will probably continue to be so for awhile after the app development ends. For this reason all db access (queries, views, etc.) have been kept in the database. I'm fairly certain I can do it from code as well... but it would certainly result in less flexiblity later - and with the functionality of T-SQL I figure there must be a way to do it. I'm continuing to search for any answers...

Thank you,


------------------