为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:DM8
【操作系统】:WIN10
【CPU】:
【问题描述】*:我有一个存储过程,返回了3个list;
CREATE OR REPLACE PROCEDURE
SelNongJJDTransDatas(
$strSpreadCertNum IN VARCHAR(50),
$strManufacturerNames IN VARCHAR(100),
$strtModel IN VARCHAR(100) :='',
$intAreaCode IN INT,
$nstrMsg OUT VARCHAR2(32767) DEFAULT '',
$spreadCertMsg OUT CURSOR,
$jsggList OUT CURSOR,
$lessenJsggList OUT CURSOR
)
AS
_strPMName varchar(200);
_strAPPLICANT varchar(200);
_strPMCode varchar(15);
_strsplit varchar2;
_strwhere varchar(500) DEFAULT '';
BEGIN
open $spreadCertMsg FOR
select top 1 GId,Authenticate,AuthenticateUrl,Authenticate_Num,
CertificateUrl,Certificate_Num,ns.id,_strPMName as Product_Item,
case when $strtModel='' then (Product_Model+case when isnull(COVERTYPE,'') in ('','无','/','\') then '' else '、'+
replace(replace(replace(replace(replace(isnull(COVERTYPE,''),',','、'),';','、'),'、','、'),',','、'),';','、') end) else ISNULL($strtModel,'') end as Product_Model,
case substring(CERTIFICATE_NUM,1,3) when 'Z20' then Product_Name+'(专定)' else Product_Name end as Product_Name,
Product_Smart,Product_Type,Start_Date,Valid_Date,BGBG=isnull(BGBG,''),RESULT_CONTENT=isnull(RESULT_CONTENT,'')
,case substring(Authenticate,1,1) when '部' then '总站' else Authenticate end as IssuingOrg,GS_Content
from TD_NONGJJD_DATAS ns
where isnull(status,'')='有效' and CERTIFICATE_NUM=$strSpreadCertNum and RTRIM(LTRIM(replace(replace(APPLICANT,char(10),' '),char(13),' ')))=$strManufacturerNames
order by INSERT_DATE desc;
OPEN $jsggList for
'select ProjectItem,Unit,DesignVal from TD_NONGJJD_JSGG jsgg,TD_NONGJJD_DATAS ns
where ns.CERTIFICATE_NUM=jsgg.CERTIFICATE_NUM and
isnull(ns.status,'''')=''有效'' and ns.CERTIFICATE_NUM='''+$strSpreadCertNum+''' and RTRIM(LTRIM(replace(replace(APPLICANT,char(10),'' ''),char(13),'' '')))='''+$strManufacturerNames+''' ' + _strwhere+'
order by jsgg.zid';
OPEN $lessenJsggList for
'select ProjectItem,Unit,DesignVal from TD_NONGJJD_JSGG_LESSEN jsgg
inner join TD_NONGJJD_DATAS ns on ns.CERTIFICATE_NUM=jsgg.CERTIFICATE_NUM
where ns.CERTIFICATE_NUM='''+$strSpreadCertNum+''' '+_strwhere+' order by jsgg.zid';
end if;
EXCEPTION
when others then
set $nstrMsg='异常!' ;
END;
可以参考一下这个链接
https://eco.dameng.com/document/dm/zh-cn/pm/dm8_sql-debug