I have sprocs that execute sql statements stored as a string, i.e.:
CREATE PROCEDURE dbo.SprocName
AS
set nocount on
declare @SQL as varchar (2000)
set @SQL = 'SELECT yada yada etc.'
exec(@SQL)
Using the above procedure, I need to be able to check for null values the query may be returning and return an error message specifying which columns are null. How can I do this?