在存储过程中一段代码入下:
a number; b varchar2;
select max(a.ygzds) into a, max(b.jlbbh) into b
from cs_data.cbsj@ww_data a, cs_data.yh_dnb@ww_data b
where
a.yhdabh = b.yhdabh
and a.jlbbh = b.jlbbh
and b.fgsbh = fgsbh
and b.yhdabh = yhdabh
and a.cblxbh = cblxbh
and a.ygzds is not null
order by year_month desc, ygzds desc编辑时说什么没分组, 但把两个into去掉这条语句查询出来的确实只有一条信息,怎么把查询出来的两个字段值插到两个变量中呢? 解决马上给分.
a number; b varchar2;
select max(a.ygzds) into a, max(b.jlbbh) into b
from cs_data.cbsj@ww_data a, cs_data.yh_dnb@ww_data b
where
a.yhdabh = b.yhdabh
and a.jlbbh = b.jlbbh
and b.fgsbh = fgsbh
and b.yhdabh = yhdabh
and a.cblxbh = cblxbh
and a.ygzds is not null
order by year_month desc, ygzds desc编辑时说什么没分组, 但把两个into去掉这条语句查询出来的确实只有一条信息,怎么把查询出来的两个字段值插到两个变量中呢? 解决马上给分.
解决方案 »
- 如何将EXCEL封装成网格控件在WINFORM中使用
- Point怎么控制坐标
- 菜鸟问题:请高手解释下AppDomain的概念和含义
- 我要学习WINFORM C# 什么网站比较好!
- 求验证邮政编码的正则表达式
- 求!~~ 在C#中 如何使用DataGrid中得”超连接数据行”得问题 !~~~~~~~~`急等!~~~~~~~~~
- listBox 里边怎么对他的item添加右键菜单?是否要自己派生。。
- 如何让dll成为公用的dll?
- 正则表达式在foreach 中连续使用的问题。。。
- 请问C#里有没有自带的能访问ftp并实现相关功能的类?
- 关于WebRequest、WebResponse,问个问题?(100分)
- 关于dataSet中的查询问题
from cs_data.cbsj@ww_data a, cs_data.yh_dnb@ww_data b
where
a.yhdabh = b.yhdabh
and a.jlbbh = b.jlbbh
and b.fgsbh = fgsbh
and b.yhdabh = yhdabh
and a.cblxbh = cblxbh
and a.ygzds is not null
order by year_month desc, ygzds desc
from cs_data.cbsj@ww_data a, cs_data.yh_dnb@ww_data b
where
a.yhdabh = b.yhdabh
and a.jlbbh = b.jlbbh
and b.fgsbh = fgsbh
and b.yhdabh = yhdabh
and a.cblxbh = cblxbh
and a.ygzds is not null
order by year_month desc, ygzds desc 不好意思,上面的弄错了
select ...into...
错误为:Error: PL/SQL: ORA-00934: group function is not allowed here
错误为:Error: PL/SQL: ORA-00934: group function is not allowed here
这个经常是用的如COUNT,SUM函数而引起的啊
换成这个就可以了select max(a.ygzds), max(b.jlbbh) into a, b