mssqldef: Operation fails when there are multiple views in database.
odz opened this issue · comments
Overview
If there are two or more views in database, any operations will fail.
Platform
- OS: Linux (probably all)
- RDBMS: SQL Server
- Version: 0.15.13
Current schema
NOTE: --export
operation fails.
CREATE VIEW v1 AS SELECT 1 AS N;
CREATE VIEW v2 AS SELECT 2 AS N;
Input SQL
CREATE VIEW v1 AS SELECT 1 AS N;
Current output
2023/03/07 00:42:17 found syntax error when parsing DDL "CREATE VIEW v1 AS SELECT 1 AS N
create view v2 as select 2 as N": syntax error at position 40 near 'create'
Expected output
DROP VIEW [dbo].[v2];