问题现象: | 客户由T63.3升至U810,在查询所有年度的应收应付款管理系统的中的科目明细账和科目余额表时报错“列名iyear无效”,已经检查过数据库列名不存在问题 [2011-6-21 14:03:45 补充] select * from Select 201101 as iYPeriod,gl_v_code.cCode as NaCo1,gl_v_code.ccode_name as Name1,Customer.cCusCode as NaCo2,Max(case when cCusName<>N'' then cCusName else cCusAbbName end) as Name2,N'期初余额' as Dgst,N'' as csign,N'' as PZID,0 as ino_id,1900-1-1 as dbill_date,1 as ibook,N'' as Exch,Sum(case when iPeriod=0 then 0 else md end) as md,Sum(case when iPeriod=0 then 0 else mc end) as mc,Sum(case when iPeriod=0 or #TmpQc.cexch_name is null then 0 else md_f end) as md_f,Sum(case when iPeriod=0 or #TmpQc.cexch_name is null then 0 else mc_f end) as mc_f,1 as nfrat,0 as Price,Sum(case when iPeriod=0 then 0 else nd_s end) as nd_s,Sum(case when iPeriod=0 then 0 else nc_s end) as nc_s,sum(case when iPeriod=0 then md-mc else 0 end) as Qc,sum(case when iPeriod=0 and #TmpQc.cexch_name is not null then md_f-mc_f else 0 end) as Qc_f,sum(case when iPeriod=0 then nd_s-nc_s else 0 end) as Qc_s,N'' as coutsign from Customer INNER JOIN (gl_v_code INNER JOIN #TmpQc ON (gl_v_code.cCode=#TmpQc.cCode and gl_v_code.iYear = #TmpQc.iYear)) ON Customer.cCusCode=#TmpQc.ccus_id where iYPeriod<'201101' and (iflag is null or iflag=2) and #TmpQc.cCode is not Null and #TmpQc.ccus_id is not Null and gl_v_code.cOther=N'AR' and #TmpQc.cCode<>N'' Group By gl_v_code.cCode,gl_v_code.ccode_name,Customer.cCusCode,Customer.cCusAbbName Having sum(md-mc)<>0 or Sum(case when iPeriod=0 then 0 else md end)<>0 or Sum(case when iPeriod=0 then 0 else mc end)<>0 Union all Select GL_accvouch.iYPeriod,gl_v_code.cCode as NaCo1,gl_v_code.ccode_name as Name1,Customer.cCusCode as NaCo2,case when cCusName<>N'' then cCusName else cCusAbbName end as Name2,GL_accvouch.cdigest as Dgst,csign,coutno_id as PZID ,ino_id,dbill_date,ibook,GL_accvouch.cexch_name as Exch,md,mc,case when GL_accvouch.cexch_name is null then 0 else md_f end as md_f,case when GL_accvouch.cexch_name is null then 0 else mc_f end as mc_f,nfrat,0 as Price,nd_s,nc_s,0,0,0,coutsign as coutsign from Customer INNER JOIN (gl_v_code INNER JOIN GL_accvouch ON gl_v_code.cCode=GL_accvouch.cCode) ON Customer.cCusCode=GL_accvouch.ccus_id where GL_accvouch.iYPeriod>='201101' and GL_accvouch.iYPeriod<='201106' and (iflag is null or iflag=2) and GL_accvouch.cCode is not Null and GL_accvouch.ccus_id is not Null and gl_v_code.cOther=N'AR' and GL_accvouch.cCode<>N'' and GL_accvouch.iPeriod>= 1 Order By NaCo1,NaCo2,iYPeriod,dbill_date,csign,ino_id [2011-6-22 14:24:42 补充] 错误的还有一条语句:Select 201101 as iYPeriod,gl_v_code.cCode as NaCo1,gl_v_code.ccode_name as Name1,Customer.cCusCode as NaCo2,Max(case when cCusName<>N'' then cCusName else cCusAbbName end) as Name2,N'期初余额' as Dgst,N'' as csign,N'' as PZID,0 as ino_id,1900-1-1 as dbill_date,1 as ibook,N'' as Exch,Sum(case when iPeriod=0 then 0 else md end) as md,Sum(case when iPeriod=0 then 0 else mc end) as mc,Sum(case when iPeriod=0 or #TmpQc.cexch_name is null then 0 else md_f end) as md_f,Sum(case when iPeriod=0 or #TmpQc.cexch_name is null then 0 else mc_f end) as mc_f,1 as nfrat,0 as Price,Sum(case when iPeriod=0 then 0 else nd_s end) as nd_s,Sum(case when iPeriod=0 then 0 else nc_s end) as nc_s,sum(case when iPeriod=0 then md-mc else 0 end) as Qc,sum(case when iPeriod=0 and #TmpQc.cexch_name is not null then md_f-mc_f else 0 end) as Qc_f,sum(case when iPeriod=0 then nd_s-nc_s else 0 end) as Qc_s,N'' as coutsign from Customer INNER JOIN (gl_v_code INNER JOIN #TmpQc ON (gl_v_code.cCode=#TmpQc.cCode and gl_v_code.iYear = #TmpQc.iYear)) ON Customer.cCusCode=#TmpQc.ccus_id where iYPeriod<'201101' and (iflag is null or iflag=2) and #TmpQc.cCode is not Null and #TmpQc.ccus_id is not Null and gl_v_code.cOther=N'AR' and #TmpQc.cCode<>N'' Group By gl_v_code.cCode,gl_v_code.ccode_name,Customer.cCusCode,Customer.cCusAbbName Having sum(md-mc)<>0 or Sum(case when iPeriod=0 then 0 else md end)<>0 or Sum(case when iPeriod=0 then 0 else mc end)<>0 Union all Select GL_accvouch.iYPeriod,gl_v_code.cCode as NaCo1,gl_v_code.ccode_name as Name1,Customer.cCusCode as NaCo2,case when cCusName<>N'' then cCusName else cCusAbbName end as Name2,GL_accvouch.cdigest as Dgst,csign,coutno_id as PZID ,ino_id,dbill_date,ibook,GL_accvouch.cexch_name as Exch,md,mc,case when GL_accvouch.cexch_name is null then 0 else md_f end as md_f,case when GL_accvouch.cexch_name is null then 0 else mc_f end as mc_f,nfrat,0 as Price,nd_s,nc_s,0,0,0,coutsign as coutsign from Customer INNER JOIN (gl_v_code INNER JOIN GL_accvouch ON gl_v_code.cCode=GL_accvouch.cCode) ON Customer.cCusCode=GL_accvouch.ccus_id where GL_accvouch.iYPeriod>='201101' and GL_accvouch.iYPeriod<='201106' and (iflag is null or iflag=2) and GL_accvouch.cCode is not Null and GL_accvouch.ccus_id is not Null and gl_v_code.cOther=N'AR' and GL_accvouch.cCode<>N'' and GL_accvouch.iPeriod>= 1 Order By NaCo1,NaCo2,iYPeriod,dbill_date,csign,ino_id 2010年度正确的语句和那个错误的语句还不一样呢。 |
问题原因: | |
解决方案: | 您好,此问题开发已出补丁解决,请使用补丁更新工具下载以AR结尾的补丁。 如有问题,请及时反馈! |
相关补丁: | |
版本: | U8 V10.0 |
模块: | 应收应付 |
产品: | 财务会计 |
问题名称: | 升级U810后错误 |
最后更新: | 2011-07-04 23:04:51 |