【问题标题】:oracle forms: max clause inside a where clause in pl/sqloracle 形式:pl/sql 中 where 子句中的 max 子句
【发布时间】:2016-04-15 17:57:34
【问题描述】:

从新记录中选择余额,其中 s_no in(select max(s_no) from newrecord) 进入 :summary.Bal ;

如何将这个从 sql 转换为 pl/sql?

说明:从表 newrecord 中选择一个余额,其中 s_no(序列号)是 newrecord 的一个成员,因此假设它从 1 到 6 开始将选择显示 s_no = 6 的余额, :summary.Bal 是显示余额的文本项

【问题讨论】:

  • yes 错误 103,“在预期以下情况之一时遇到符号 'into' ;对于和或组与负序开始并集相交,其中连接符号;之前插入到继续”
  • 试图按原样使用代码,因为在 pl/sql 中搜索等效项在 google 中没有成功

标签: forms oracle plsql max oracleforms


【解决方案1】:

使用正确的语法:

select <field_name> into <variable_name> from <rest of query>

另外,查询中不需要 IN 运算符,只需写 =

... where s_no = (select max(s_no) from newrecord)

【讨论】:

  • 完美,我知道那里一定有什么东西,谢谢。
  • 如果这解决了问题,请将您的问题标记为已回答,这样它就不会出现在未回答问题列表中。干杯!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-31
  • 1970-01-01
  • 2013-06-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多