Closed akarnavasco closed 1 month ago
I get a weird behavior when declaring a Table variable in SqlServer Version 2022.
Please check DbSchema Help / Output logs for errors. No errors reported in log. 16:00:42 > runScript
16:00:42 > runScript
Please include the DbSchema version, operating system and used database
DB Schema version: DbSchema 9.5.4 build 240504 DbSchema Community Edition
OS version: Ubuntu 22.04.4 LTS
Database version: SqlServer Version 2022 Build version 16.0.4095.4
The steps to reproduce this issue
Run the following script (with auto-commit enabled)
DECLARE @Columns100 TABLE (Name NVARCHAR(MAX)); CREATE TABLE dummy33 (Name NVARCHAR(MAX)); INSERT INTO dummy33 VALUES ('Value1'), ('Value2'); SELECT * FROM dummy33;
Expected Output:
DECLARE @Columns100 TABLE (Name NVARCHAR(MAX)); CREATE TABLE dummy33 (Name NVARCHAR(MAX)); Modified -1 rows INSERT INTO dummy33 VALUES ('Value1'), ('Value2'); Modified 2 rows SELECT * FROM dummy33; Name ====== Value1 Value2 Read 2 rows
Actual Output:
DECLARE @Columns100 TABLE (Name NVARCHAR(MAX)); CREATE TABLE dummy33 (Name NVARCHAR(MAX)); INSERT INTO dummy33 VALUES... Modified 2 rows
Notes
Schema is not auto-refreshing after running above script.
The table dummy33 table is created and populated as expected but it appears that the Select statement does not run.
dummy33
Select
Same behavior happens when declaring a table variable, populating the table and then querying the table:
DECLARE @Columns100 TABLE (Name NVARCHAR(MAX)); INSERT INTO @Columns100 VALUES ('Value1'), ('Value2'); SELECT * FROM @Columns100;
All above scripts run perfectly fine by the same user using SQL Server Management Studio as well as other db clients.
Please install the current beta: https://dbschema.com/beta.php The select statement seems to run. We have still to fix the schema auto-refresh, but we don't consider this as a priority issue.
I get a weird behavior when declaring a Table variable in SqlServer Version 2022.
Please check DbSchema Help / Output logs for errors. No errors reported in log.
16:00:42 > runScript
Please include the DbSchema version, operating system and used database
DB Schema version: DbSchema 9.5.4 build 240504 DbSchema Community Edition
OS version: Ubuntu 22.04.4 LTS
Database version: SqlServer Version 2022 Build version 16.0.4095.4
The steps to reproduce this issue
Run the following script (with auto-commit enabled)
Expected Output:
Actual Output:
Notes
Schema is not auto-refreshing after running above script.
The table
dummy33
table is created and populated as expected but it appears that theSelect
statement does not run.Same behavior happens when declaring a table variable, populating the table and then querying the table:
All above scripts run perfectly fine by the same user using SQL Server Management Studio as well as other db clients.