Snowflake procedure creation fails in DBeaver, not in Snowflake
See original GitHub issueDescription
I cannot create a snowflake procedure that has a CASE statement in one of it’s statements.
DBeaver Version
22.1.4.202208051447 22.2.0.202209051344
Operating System
Win 11
Database and driver
net.snowflake:snowflake-jdbc:RELEASE [3.13.6]
Steps to reproduce
Running this script:
CREATE OR REPLACE PROCEDURE does_not_work_from_dbeaver()
RETURNS NUMBER(1,0)
LANGUAGE SQL
EXECUTE AS CALLER
AS $$
BEGIN
SELECT 1
,CASE
WHEN TRUE THEN '1'
ELSE '2'
END AS col1
;
END;
$$;
in DBeaver gives this error:
Error occurred during SQL query execution
Reason:
SQL Error [1003] [42000]: SQL compilation error:
parse error line 15 at position 4 near '<EOF>'.
syntax error line 5 at position 4 unexpected '$'.
After much effort I found that the END of the CASE statement is giving DBeaver troubles. When I remove the case statement from the query, the code is accepted.
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
how to fix this snowflake SQL compilation error - Stack Overflow
Hi, I am getting this above error while trying to view, store procedure data in snow flake. Can somebody help me on this...
Read more >Not able to connect to Snowflake trial instance. My guess is ...
I've tried using dbeaver, ETLwork and SnowSQL, but no luck? Error Message: Certificate for < <ACCOUNT NAME>.
Read more >How to set up the DBeaver Snowflake Connection? 3 Easy ...
Click on the “Ok” button in the Connection Test dialog box. Step 8: Then, click on the “Finish” button in the Snowflake Connection...
Read more >[Snowflake Quick Tips] How to start data modeling with DBeaver
This is a 5 minutes tutorial to quickly get you started on Snowflake data modeling. Copy and paste this SQL database creation script...
Read more >No Source Code for Views and Stored Procedures
Try again using Heidi, if it works then it's a bug in DBeaver, if not, maybe its a user permissions error? Either way,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you. Now that my problem is solved, we can close this ticket. Kind regards, Hans Kappert
You can check this instrument: https://github.com/dbeaver/dbeaver/wiki/Query-Manager
You can see there - what statements do you execute.