Skip to content

SQL Kernel: A T-SQL variable is not visible / accessible outside of cell context #8041

Open
@PiJoCoder

Description

@PiJoCoder

Issue Type: Bug

Step 1. Create a new cell using Add Code and paste this:
declare @a int = 100 select @a
Step 2. Create yet another cell using Add Code and paste this:

select @

Step 3. Run Cells

You will get this error which indicates that variables in the SQL kernel are only cell-scope. In the Python kernel they are available in the entire Notebook

Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@A".

Azure Data Studio version: azuredatastudio-insiders 1.13.0-insider (34fe2b4, 2019-10-24T07:49:24.669Z)
OS version: Windows_NT x64 10.0.18362

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions