0

我有一个查询:

SELECT * FROM table(i#1040_inv_adj_fn('123'))

如何添加常量值?此示例不起作用:

SELECT *, 'John' Name FROM table(i#1040_inv_adj_fn('123'))

错误:

ORA-00923: FROM keyword not found where expected
00923. 00000 -  "FROM keyword not found where expected"
*Cause:    
*Action:
Error at Line: 1 Column: 9
4

1 回答 1

4

由于您没有告诉我们错误是什么,我们必须猜测。我的猜测是您需要表函数的别名,否则*不合法:

SELECT  t.*, 
        'Name' as John  
FROM table(i#1040_inv_adj_fn('123')) t
于 2013-03-28T10:31:26.380 回答