Open ray-kudos opened 3 months ago
Thank you for bug report. As a workaround, you can select whole block and press Execute SQL query
.
Thank you for the workaround. It worked for those scripts. However, when I executed the actual scripts below using your workaround, I encountered an "Incorrect syntax near 'GO'." error and if I executed the scripts using Execute SQL Scripts (Alt+X), I received an "Incorrect syntax near ';'." error.
IF OBJECT_ID ( '[dbo].[temp_procedure]', 'P' ) IS NOT NULL
DROP PROCEDURE [dbo].[temp_procedure];
GO
CREATE PROCEDURE [dbo].[temp_procedure]
@ChildDBName NVARCHAR(128),
@ParentDBName NVARCHAR(128)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @TableSuffix NVARCHAR(128) = CASE WHEN COALESCE(@ParentDBName, '') = '' THEN '' ELSE @ChildDBName END;
END
You can change statement delimiter from ;
to GO
in preferences
I have done it but it still shows the same errors.
Description
I tried to run a query below, but encountered an error in DBeaver stating "Incorrect syntax near ';'. " when executed, even though it runs okay in SSMS. BEGIN DECLARE @Error1 INT = CASE WHEN 1 = 1 THEN 1 ELSE 0 END; SELECT @Error1; END
DBeaver Version
Community Edition Version 24.0.4.202405051837
Operating System
Windows 10 Pro 20H2
Database and driver
Steps to reproduce
Additional context
No response