1

when I run the snowflake Lab exercise query it gets the error while the data actually inserted into the table. what's wrong?

sql query

error screenshot

data screenshot

1
  • 1
    I typically see this issue when somebody accidentally highlights a space or something that is commented out and clicks run. Are you sure you are positioned correctly in the UI to execute the query? Commented Sep 23, 2020 at 0:52

1 Answer 1

4

I think it's because you're highlighting the SQL statement and clicking run. See how you've highlighted beyond the last semi-colon (;) ? It's trying to run both the SQL statement before the ; AND the one after which is simply a comment // Links 2015 book... because you've highlighted that too.

In the Snowflake UI, you don't have to highlight the SQL statement to run just that block. Simply put your mouse into the SQL statement and click Ctrl+Enter (cmd+enter on mac) and it'll run the piece of SQL after the preceding ;

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your comment. The error happened as you stated, but I was confused that the data was actually inserted into the table with the error appearing.

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.