Comments
1 comment
- 
                
                   Official comment Official commentHi TevorMcComb, Thank you for reaching out on the Redgate forums regarding your SQL Prompt variable warning. 
 I've recreated a similar situation where variables are set within a SELECT statement and prompt this warning. I think this is triggered because the variables are set, but not technically used in that senses.
 The warning cleared once the variables were used later in the script. It's a bit of peculiar behaviour though. If I set a variable to have a value outside a SELECT block, this warning didn't appear.
 I'm going to put this through to our developers to see if there is possibly a bug in the behaviour. In the interim, though, this should just be a warning and having unused variables would not affect code execution or formatting.
Add comment
Please sign in to leave a comment.
Version 10.16.2.14461
Regards
Trevor