when I run the snowflake Lab exercise query it gets the error while the data actually inserted into the table. what's wrong?
-
1I 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?Mike Walton– Mike Walton2020-09-23 00:52:22 +00:00Commented Sep 23, 2020 at 0:52
Add a comment
|
1 Answer
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 ;
1 Comment
bobo
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.