|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
T6 年结
-----------------------------------------------------------------
时间:2016-01-11--下午 06:04:43
帐套:XXXX有限公司2015
年度:2016
程序名: clsCHTonextYear: TurnOver : AccSummary1
模块:存货管理-总帐数据
最后语句:INSERT INTO IA_SubSidiaryPreAss (cFlag,InID,cInVouCode,dInVouDate,dInKeepDate,inQuantity,inCost,inPrice,bRdFlag, cBusType, cBusCode, cVouCode, ID, ValueID, JustID, dVouDate, dKeepDate, iMonth, iPZID,cInvHead, cDifHead, cVouType, cPTCode, cSTCode,cWhCode, cInvCode, cAccDep, cRdCode, cVenCode, cCusCode,cBillCode, cDLCode, cPSPCode,cProCode, cDepCode, cPersonCode, cHandler,iAInQuantity, iInCost, iAInPrice,iAOutQuantity, iOutCost, iAOutPrice, iDebitDifCost, iCreditDifCost,cBatchCode, cMaker,cAccounter, bFlag, bMoneyFlag, bSale, cMemo, cDefine1, cDefine2, cDefine3,cDefine4, cDefine5, cDefine6,cDefine7,cDefine8, cDefine9, cDefine10, cDefine11, cDefine12, cDefine13,cDefine14, cDefine15, cDefine16,cFree1,cFree2,cFree3,cFree4, cFree5,cFree6,cFree7,cFree8,cFree9,cFree10,cdefine22,cdefine23,cdefine24,cdefine25,cdefine26,cdefine27, cdefine28,cdefine29,cdefine30,cdefine31,cdefine32,cdefine33,cdefine34,cdefine35,cdefine36,cdefine37,cPZID,citem_class,citemcode,citemcname,cname)SELECT IA_Vss.cFlag,max(IA_Vss.InID),max(IA_Vss.cIVouCode) as cInVouCode,max(IA_Vss.didate) as dInVouDate,max(IA_Vss.dikeepdate) as dInKeepDate,max(IA_Vss.iiquantity )as inQuantity,max(IA_Vss.iicost) as inCost,max(IA_Vss.iiprice) as inPrice,IA_Sub.bRdFlag,max( IA_Sub.cbustype),max(IA_Sub.cbuscode),max(IA_Sub.cvoucode),max(IA_Sub.ID),max(IA_Sub.ValueID),max(IA_Sub.JustID),max(IA_Sub.dVouDate),max(IA_Sub.dKeepDate),max(IA_Sub.iMonth),max(IA_Sub.iPzID),max(IA_Sub.cinvhead),max(IA_Sub.cdifhead),max(IA_Sub.cVouType),max(IA_Sub.cPTCode),max(IA_Sub.cSTCode),max(IA_Sub.cWhCode),max(IA_Sub.cInvCode),max(IA_Sub.cAccDep),max(IA_Sub.cRdCode),max(IA_Sub.cVenCode),max(IA_Sub.cCusCode),max(IA_Sub.cBillCode),max(IA_Sub.cDLCode),max( IA_Sub.cPSPCode),max(IA_Sub.cProCode),max( IA_Sub.cDepCode),max(IA_Sub.cPersonCode),max(IA_Sub.cHandler),max(IA_Sub.iAInQuantity),max( IA_Sub.iInCost),max(IA_Sub.IAinPrice),max(IA_Vss.ioquantity) as iAOutQuantity,max(IA_Vss.iocost) as iOutCost,max( IA_Vss.ioprice) as iAOutPrice,max(IA_Sub.iDebitDifCost),max( IA_Sub.iCreditDifCost),max(IA_Sub.cBatchCode),max( IA_Sub.cMaker),max(IA_Sub.cAccounter),ia_vss.bFlag,Ia_Sub.bMoneyFlag,IA_Sub.bSale,max(IA_Sub.cMemo),max(cDefine1),max( cDefine2),max( cDefine3),max(cDefine4),max( cDefine5),max( cDefine6),max(cDefine7),max(cDefine8),max( cDefine9),max(cDefine10),max( cDefine11),max(cDefine12),max( cDefine13),max(cDefine14),max(cDefine15),max( cDefine16),max(IA_Sub.cFree1),max(IA_Sub.cFree2),max(IA_Sub.cFree3),max(IA_Sub.cFree4),max(IA_Sub.cFree5),max(IA_Sub.cFree6),max(IA_Sub.cFree7),max(IA_Sub.cFree8),max(IA_Sub.cFree9),max(IA_Sub.cFree10),max(cdefine22),max(cdefine23),max(cdefine24),max(cdefine25),max(cdefine26),max(cdefine27),max(cdefine28),max(cdefine29),max(cdefine30),max(cdefine31), max(cdefine32),max(cdefine33),max(cdefine34),max(cdefine35),max(cdefine36),max(cdefine37),max(cPZID),max(citem_class),max (citemcode), max(citemcname), max(cname) FROM UFDATA_015_2015..ia_valuationass IA_Vss inner Join UFDATA_015_2015..Ia_Subsidiary Ia_Sub ON case when Ia_Sub.brdflag=1 then IA_Vss.outid else IA_Vss.AutoID end = case when Ia_Sub.brdflag=1 then ia_sub.id else Ia_Sub.ValueID end and IA_Vss.dokeepdate = IA_Sub.dkeepdate and (Subid in (11,-1) or (( ia_sub.bsale=1 and ia_sub.cvoutype in(N'05',N'06',N'5',N'6') ) or (ia_sub.bsale=0 and ia_sub.cvoutype in (N'26',N'27',N'28',N'29') )) ) inner join tmpIAJZ on tmpIAJZ.id = IA_Vss.inid Where IA_Vss.OutiD Is Not Null And IsNull(IA_Vss.ipreyear, 0) = 0 and isnull(IA_Vss.cFlag,'') <> '结算' and exists(select 1 from UFDATA_015_2015..rdrecords inner join UFDATA_015_2015..rdrecord on UFDATA_015_2015..rdrecord.id=UFDATA_015_2015..rdrecords.id where UFDATA_015_2015..rdrecords.Autoid=IA_Vss.inid and UFDATA_015_2015..rdrecord.cvouchtype='01') group by ia_vss.autoid,IA_Vss.bFlag,IA_Vss.cFlag,Ia_Sub.bMoneyFlag,IA_Sub.bSale,IA_Sub.bRdFlag,IA_Vss.ipreyear order by IA_Vss.AutoID
错误信息: 将截断字符串或二进制数据。
|
|