英文:
Getting Invalid Identifier for Snowflake Sequence Nextval when running in snowflake environment
问题
我在Snowflake中创建了一个名为SEQ_AUTHOR_ID的序列。当我在Snowflake环境中运行查询"select SEQ_AUTHOR_ID.nextval"时,我已经在"LIBRARY_CARD_CATALOG.Public"环境中创建了它,并在同一环境中运行查询。代码:"SELECT SEQ_AUTHOR_ID.nextval;" 我得到以下错误:无效的标识符'SEQ_AUTHOR_ID.NEXTVAL'。
我想要解决这个错误,我尝试在相同的环境中运行,但问题没有解决。
英文:
I created a Sequence SEQ_AUTHOR_ID in Snowflake. when I am running the query "select SEQ_AUTHOR_ID.nextval" in the snowflake environment,I had created it in the environment "LIBRARY_CARD_CATALOG.Public" and running the query in same environment. CODE:"SELECT SEQ_AUTHOR_ID.nextval;" I am getting the below Error: invalid identifier 'SEQ_AUTHOR_ID.NEXTVAL'
I want to resolve the Error I tried to run in same Environment but it is not resolved.
答案1
得分: 1
请确保您在窗口中选择了相同的数据库。或者尝试使用绝对数据库和模式名称以及序列运行。我尝试了所有选项,在我的情况下它可以工作。
SELECT LIBRARY_CARD_CATALOG.Public.SEQ_AUTHOR_ID.NEXTVAL
英文:
Please make sure that you have selected the same database in your window. Or try to run with absolute database and Schema name along with the sequence. I tried all the options and it works in my case.
SELECT LIBRARY_CARD_CATALOG.Public.SEQ_AUTHOR_ID.NEXTVAL
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论