Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调用达梦数据库存储过程报错,提示Sql执行失败 #1950

Closed
Sgrvaries opened this issue Aug 24, 2023 · 6 comments
Closed

调用达梦数据库存储过程报错,提示Sql执行失败 #1950

Sgrvaries opened this issue Aug 24, 2023 · 6 comments

Comments

@Sgrvaries
Copy link

版本号:

1.5.9

问题描述:

调用存储过程,入参为日期类型Date,出参为游标sys_refcursor,执行报错

错误日志&截图:

image
image

重现步骤:

友情提示(为了提高issue处理效率):

  • 积木报表是一款免费报表产品,功能免费源码不开放;
  • 未按格式要求发帖,会被直接删掉;
  • 请针对问题提供报表设计SQL脚本或在官网制作报表示例并提供ID;
  • 针对不好重现的问题,请录制操作视频或详细的重现步骤;
@lvdandan16
Copy link
Collaborator

收录 ws

@Sgrvaries
Copy link
Author

create or replace procedure jmtest1(XM in DATE, outds out sys_refcursor) is
begin
open outds for
select '1' as id, '张三' as name from dual;
end;

@1298191366
Copy link

你确定达梦数据库能查询出来数据吗,我用你的写法数据库都查询不出来数据,使用CALL jmtest1(2023-12-09,?),目前只支持CALL查询,其他暂不支持
image
image
image

你用下面的写法不用游标也可以实现数据查询
image
image
image

@Sgrvaries
Copy link
Author

现在只是写了一个很简单的测试demo来说明问题,真实业务有很多表关联,而后将数据塞进游标进行返回,并不是简单的查询而已,之所以用存储过程就是为了后期维护方便。

@1298191366
Copy link

我知道是demo,就是你用这种写法dm数据库能查询出来数据吗,通过CALL jmtest1(2023-12-09,?),因为oracle数据库通过CALL能查询出来,复杂写法暂不支持

@lvdandan16
Copy link
Collaborator

归集到 #138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants