The following dynamic sql statement executes the first print statement when the @standid variable is not null. Any ideas, perhaps a dynamic sql qwerk?
declare @standid varchar(100)
Declare @SQL VarChar(1000)
SELECT @SQL = ' SELECT' + @standid + '= standid FROM ' + @TableName + ' where standid is null'
If @standid is null
Begin
print 'ERROR. There are missing standids in the standedits Layer. '
print''
End
Else
print 'NO ERRORS. There arent any Missing Standids.'
print''
declare @standid varchar(100)
Declare @SQL VarChar(1000)
SELECT @SQL = ' SELECT' + @standid + '= standid FROM ' + @TableName + ' where standid is null'
If @standid is null
Begin
print 'ERROR. There are missing standids in the standedits Layer. '
print''
End
Else
print 'NO ERRORS. There arent any Missing Standids.'
print''