question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when creating procedure/function/trigger where SQL script contain semicolon character

See original GitHub issue

DBeaver - Version 4.2.5 CE DBeaver JDBC driver: Microsoft Operating System: Windows 7 / Windows 8.1 Database Server: Microsoft SQL Express 2014

When Writing SQL scripts for SQL Server it is supported/encouraged to use “;” character as end of command marker.

But when trying to execute script in DBeaver that create procedure, function or triggers and contain “;” error messages are generated.

   Error occurred during SQL script execution    Reason: SQL Error [102][S0001]: Incorrect syntax near ‘;’.

Execute the SQL Scripts below using SQL EDITOR -> EXECUTE SQLSCRIPT menu choice.

This work OK

CREATE PROCEDURE **TestProc**
AS BEGIN
  SELECT 'TestProc'
END
GO

This generate an ERROR

CREATE PROCEDURE **TestProc**
AS BEGIN
  SELECT 'TestProc';
END;
GO

Seems that the “;” character after “SELECT ‘TestProc’” make it fail. If run in SQL Server Management Studio or JetBrains DataGrip everything works ok.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
johnjsoracommented, Jan 30, 2018

You need go to dbeaver preferences-sqleditor-sql processing and remove the semicolon on the statements delimiter

0reactions
kseniiaguzeevacommented, Mar 24, 2020

Is the ticket still actual for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when creating procedure/function/trigger where SQL ...
Error when creating procedure/function/trigger where SQL script contain semicolon character ; Version 4.2.5 CE DBeaver JDBC driver: Microsoft
Read more >
SQL Editor shows syntax errors when the DDL statement ... - IBM
The errors occur when the statement terminator for the script is set to semi-colon (;), and the body of the routine definition also...
Read more >
SA0078 : Statement is not terminated with semicolon
Add semicolon at the end of the statement. Scope. The rule has a Batch scope and is applied only on the SQL script....
Read more >
When do I need to use a semicolon vs a slash in Oracle SQL?
In PL/SQL if you have a subprogram (DECLARE, BEGIN, END) the semicolon used will be considered as part of the subprogram, so you...
Read more >
11. Creating stored procedures and triggers - SQL Workbench/J
The solution is to terminate the script with a character sequence that is called the "alternate delimiter" which can be defined in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found