1

ALTER VIEW "test_RAWDATA" RENAME TO "TBD_test_RAWDATA";

I am getting following error: SQL compilation error: Empty SQL statement.

I have tried with new sheet as well but it is giving this error everywhere.

1
  • Are you sure you run correctly the SQL statement? I just did a quick test with something like this: create view "test_RAWDATA" as SELECT * FROM A; ALTER VIEW "test_RAWDATA" RENAME TO "TBD_test_RAWDATA"; and it worked fine. I think the issue is caused by the way you run the SQL statement. Commented Oct 12, 2021 at 11:51

1 Answer 1

1

This can happen when you execute certain SQL statements in the GUI along with some comments in the same line of the code. For example:

USE ROLE SYSADMIN;
USE "DEMO_DB"."PUBLIC";
CREATE TABLE t1 (id integer);
CREATE VIEW test_view as SELECT * FROM t1;

## View TEST_VIEW successfully created.

Now we can ALTER the view:

ALTER VIEW test_view RENAME TO test_view2;

##  Statement executed successfully.

but, if we add a comment:

ALTER VIEW test_view2 RENAME TO test_view3 ;  /* A comment */

## SQL compilation error: Empty SQL statement.
Sign up to request clarification or add additional context in comments.

4 Comments

This no longer occurs in Snowsight, just tested it
@patrick_at_snowflake it still happens in the classic Web UI though
I will try..thanks so much for swift response
Snowsight will at some point replace Classic UI - you won't expect any more development on the Classic UI

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.