【发布时间】:2015-05-13 15:46:18
【问题描述】:
当我启动以下任务 .cmd 时:
sqlplus -s User/Password@database @Query.sql 'G:'
我得到这个错误:
SP2-0734: unknown command beginnin
即使添加集合sqlblanklines on 也失败了。
使用像select * from table1 这样的简单查询就可以了。
使用更复杂的查询(多重连接,分组依据)它不起作用 => 即使文件生成良好。在文件中,我只找到错误详细信息。
请在下面找到有关该问题的更多详细信息:
SP2-0734: unknown command beginning "FROM NOTI...." - rest of line ignored.
SP2-0734: unknown command beginning "INNER JOIN..." - rest of line ignored.
SP2-0734: unknown command beginning "INNER JOIN..." - rest of line ignored.
SP2-0734: unknown command beginning "INNER JOIN..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "INNER JOIN..." - rest of line ignored.
SP2-0734: unknown command beginning "INNER JOIN..." - rest of line ignored.
SP2-0734: unknown command beginning "INNER JOIN..." - rest of line ignored.
SP2-0734: unknown command beginning "INNER JOIN..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "LEFT JOIN ..." - rest of line ignored.
SP2-0734: unknown command beginning "LEFT join ..." - rest of line ignored.
SP2-0734: unknown command beginning "LEFT join ..." - rest of line ignored.
SP2-0734: unknown command beginning "LEFT JOIN ..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning "LEFT join ..." - rest of line ignored.
SP2-0734: unknown command beginning "LEFT join ..." - rest of line ignored.
SP2-0734: unknown command beginning "WHERE NOTI..." - rest of line ignored.
SP2-0734: unknown command beginning "GROUP BY N..." - rest of line ignored.
SP2-0044: For a list of known commands enter HELP
and to leave enter EXIT.
SP2-0734: unknown command beginning ",table1..." - rest of line ignored.
SP2-0734: unknown command beginning ",table2..." - rest of line ignored.
【问题讨论】:
-
您声称该文件“生成良好”。 SQL*Plus 和/或 Oracle 指示存在语法错误。我倾向于相信甲骨文。仅当您尝试生成更复杂的脚本时它才会失败,这一事实只会使问题更有可能是您的脚本有错误。由于您没有向我们展示脚本,因此我们无法提供太多建议。
-
可能有助于显示您的 Query.sql 文件,因为其中包含错误代码。并正确格式化所有错误消息。你为什么在标题中提到蟾蜍?假脱机和 CSV 似乎也不相关,即使您在未显示的文件中这样做。
-
您好 @AlexPoole 和 JustinCave 感谢您的回复。对不起,你是对的,我只是用 SQL 脚本编辑我的帖子。你知道这个问题吗?确实这个脚本我不使用 toad,只使用 SQL*Plus。
-
您好 AlexPoole 和 @JustinCave 感谢您的回复。对不起,你是对的,我只是用 SQL 脚本编辑我的帖子。你知道这个问题吗?确实这个脚本我不使用 toad,只使用 SQL*Plus。