【发布时间】:2021-03-10 19:47:33
【问题描述】:
对不起,如果我的问题听起来很愚蠢,但我对编码相对较新,尤其是在 Oracle SQL Developer 中,并且确实需要帮助。我曾经使用过 mySQL。所以我还是有点迷茫。
这是我的代码:
CREATE VIEW ViewC AS
SELECT * FROM watermeter
WHERE deployeddate <= dateadd(month,-6, getdate()) AND
deployeddate > CURRENT_DATE();
代码错误:
Error starting at line : 1 in command -
CREATE VIEW ViewC AS
SELECT * FROM watermeter
WHERE deployeddate <= dateadd(month,-6, getdate()) AND
deployeddate > CURRENT_DATE()
Error report -
ORA-00933: SQL command not properly ended
00933. 00000 - "SQL command not properly ended"
*Cause:
*Action:
如果您想知道,问题是: 列出未来 6 个月内到期更换的仪表(此视图应该能够在未来的任何时间工作,无需更改以适应日期)。
【问题讨论】:
标签: sql oracle oracle-sqldeveloper ora-00933