【发布时间】:2012-07-17 18:19:19
【问题描述】:
我目前正在编写一个插入语句,它给了我“ORA-00923:未在预期的地方找到来自关键字。有什么办法可以做到这一点吗?谢谢。这是语句:
Insert into seda_owner.seda_lookup(table_name,description,sequence,value)
Select 'DEFAULT_CATE_CHG_ITEMS_DOCS','Software Requirements Specification', '1',
(select **value** from seda_owner.seda_document a
join seda_owner.seda_lookup b
on b.value = a.guid and description = 'Software Requirements Specification');
我尝试将 3 个字符串 table_name、description 和 sequence 以及一个变量值传递给 table seda_lookup。
【问题讨论】:
-
问题似乎出在您的变量值中,请尝试在变量中传递具有静态值的值。这将为您提供更多信息来解决问题。
-
尝试 Select 'DEFAULT_CATE_CHG_ITEMS_DOCS','Software Requirements Specification', '1', E.value from (select value from seda_owner.seda_document a join seda_owner.seda_lookup b on b .value = a.guid 和 description = '软件需求规范') E;反而?使用子查询作为自己的表