Slight Bug
Ozzie
Posts: 47 Bronze 5
Run this snippet in through 'Find Unused Variables and Parameters'
It'll underline @Inactive in Green and say on mouseover 'The value assigned here is never used'
Best,
Ozzie
BEGIN DECLARE -- User Friendly Constants @Inactive BIT = 0, @Active BIT = 1, @Exists BIT; SET @Exists = ( SELECT Active FROM dbo.CorrespondenceType WHERE CorrespondenceTypeID = 19 ); IF( ISNULL( @Exists, @InActive ) = @Active ) BEGIN PRINT 'There' END; ELSE BEGIN PRINT 'Not there'; END END
It'll underline @Inactive in Green and say on mouseover 'The value assigned here is never used'
Best,
Ozzie
Comments
Thank you for reporting this. It appears 'Find Unused Variables and Parameters' is running a case sensitive check.
I've logged this as SP-6167 and will get back to you when we get around to fixing it.
We have produced a private build for you with a fix for the case sensitive check.
You can download it here.
Would it be possible to check if this build resolves the issue?
Thanks,
Michael
Technical Lead, SQL Monitor
Ozzie
Thanks again,
Ozzie