0
저장 프로 시저를 작성하고 반환 변수로 varchar (200) varibale을 가졌지 만 출력에서 "varchar 값을 정수로 변환하는 동안 변환이 실패했습니다"라는 표시가 나타납니다 프로 시저는 int로 변환되지 않지만 im은 에러를 직면합니다.저장 프로 시저의 반환 값에 오류가 발생했습니다
alter proc rulename @mfid varchar(20)
as
declare @ACF2 varchar(200)
begin
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2='Apollo'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2= @ACF2 + 'GP'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2= @ACF2 + ',' + 'Tactical Comp'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2= @ACF2 + ',' + 'Unit Valuation'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where MFID=[email protected]) > 0)
begin
set @ACF2= @ACF2 + ',' + 'NPVS'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2= @ACF2 + ',' + 'Apollo Test'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2= @ACF2 + ',' + 'GP Test'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2= @ACF2 + ',' + 'Tactical Comp Test'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2= @ACF2 + ',' + 'Unit Valuation Test'
end
if((select count(distinct(Rulename)) as count1 from MainframeExtractsPLP where [email protected]) > 0)
begin
set @ACF2= @ACF2 + ',' + 'NPVS Test'
end
return @ACF2
end