January 22, 2013 at 8:06 pm
Comments posted to this topic are about the item Check Candidate Columns for NOT NULL Constraints
January 23, 2013 at 7:41 am
Charles,
Thanks for taking the effort to create and share this script. I ran into a problem where column names contained special characters or spaces. They would then be reported in the Skipped results. So I modified the one line of your script that generates the dynamic SQL to use brackets to avoid this. Here is the modified line:
set @sql = N'set @b-2 = (case when exists(select 1 from [' + @SchemaName + '].[' + @TableName + '] where [' + @ColumnName + '] is null) then 1 else 0 end);';
Thanks again.
Lee
January 23, 2013 at 7:44 am
Thanks Lee. Great suggestion.
I'll take your advice and make the suggestion on my copy.
Charles.
May 2, 2016 at 4:22 pm
Thanks for the script.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply