Run this snippet in through 'Find Unused Variables and Parameters'
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
Ozzie
0

Comments

4 comments

  • Andrei R
    Hi Ozzie,

    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.
    Andrei R
    0
  • Michael Clark
    Hi Ozzie,

    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
    Michael Clark
    0
  • Ozzie
    Yes - thanks so much!

    Ozzie
    Ozzie
    0
  • Ozzie
    That fix worked perfectly!

    Thanks again,
    Ozzie
    Ozzie
    0

Add comment

Please sign in to leave a comment.