问题描述:
速达财务6.42结帐时提示l_money_cursor不存在。
解决方法:
您好,亲:您可以参照以下解决方法:
解决方法:运行脚本—— SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO -----qlp---- CREATE procedure aa_closeoffadjrate @curryear integer, @currmonth integer, @cokendadjrate integer, @succeeded integer out as set nocount on declare @moneyid integer; declare @subid integer; declare @isdebit integer; declare @credid integer; declare @rate t_rate; declare @amt t_amount; declare @sumamt t_amount; declare @local_tab_adj table(subjectid integer, isdebit int); declare @local_tab_money table(moneyid integer, rate double precision); declare l_adj_cursor cursor for select * from @local_tab_adj; begin set @succeeded = 0; execute aa_getcredbyorigin @curryear,@currmonth,@cokendadjrate,@credid out; if (@credid <> 0) begin set @succeeded = 1; --deallocate l_money_cursor return; end set @sumamt = 0; insert into @local_tab_money select moneyid, rate from al_money where moneyid <> 0; declare l_money_cursor cursor for select * from @local_tab_money; open l_money_cursor; fetch next from l_money_cursor into @moneyid,@rate while @@fetch_status = 0 begin delete from @local_tab_adj; insert into @local_tab_adj select subjectid, isdebit from al_subject where isdetail = 1 and tofmoney=1 /*and moneyid = @moneyid*/ and isadjrate=1; open l_adj_cursor; fetch next from l_adj_cursor into @subid,@isdebit while @@fetch_status = 0 begin execute aa_getadjustrateamt @subid,@isdebit,@moneyid,@rate,@curryear,@currmonth,-99, @amt out; if (@isdebit=1) set @sumamt = @sumamt + @amt; else set @sumamt = @sumamt - @amt; fetch next from l_adj_cursor into @subid,@isdebit end close l_adj_cursor fetch next from l_money_cursor into @moneyid,@rate end if(@sumamt = 0) set @succeeded = 1; close l_money_cursor deallocate l_money_cursor deallocate l_adj_cursor end GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
正确操作使用软件,如果软件有何问题,请随时致电科睿电脑软件技术人员,24小时技术支持。