Not recognizing variables until new line

We create our variables like this, initializing them on the same line:

DECLARE @this_is_a_variable_with_a_long_name int; SET @this_is_a_variable_with_a_long_name = 0

Is there any way to have SQL Prompt recognize the variable name after the semicolon is typed so that we can use it in the set statement? Otherwise we have to either retype the variable name or cut and paste it. Thanks.

Comments

  • Hi Matthew,

    Unfortunately there isn't an option to make this work when you are setting the variable on the same line.

    I have added this as a bug/feature request which will be considered for a future release.
    Matthew Flatt
    Redgate Foundry
Sign In or Register to comment.