Skip to content

Multiple statements in same script not working #822

@marcelovital

Description

@marcelovital

When running a sql script with multiple statements, execution stops at the first one, or the second one is "not aware" of the first one.

Quick example:
DECLARE @abc VARCHAR(10) = 'test'; SELECT @abc;
returns:
Must declare the scalar variable "@abc".

It does also "misbehave" in the interface, with the connection information showing between lines.
Image

If we add several blank lines to the start, and the example script mentioned above is in line 5, for instance, it stops throwing the error, but instead simply returns:
Success, 1 row affected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions