|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
发货单 ,已存在的单据 修改时, 选择存货编码 弹出对话框 栏目设置中字段数 (40) 与传入SQL串的列数41不等,通过跟踪发现下面这个语句 传递给栏目41个字段值。 不知道怎么处理了。谢谢大侠指点。
select warehouse.cWhcode,warehouse.cwhname,inventory.cInvCode,inventory.cInvaddCode,cinvname,cInvStd,iInvLSCost,iInvSCost,cfree1,cfree2,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10,ltrim(str(cast(iQuantity as decimal(20,2)),20, 2)) as RealyiQuantity,ltrim(str(cast(inum as decimal(20,2)),20,2)) as RealyiNum,ltrim(str(cast(ISNULL(iQuantity,0) - ISNULL(fOutQuantity,0) as decimal(20,2)),20, 2)) as iCanQuantity,ltrim(str(cast(ISNULL(iNum,0) - ISNULL(fOutNum,0) as decimal(20,2)),20,2)) as iCanNum,cBatch,dVDate,dMDate ,cInvDefine1,cInvDefine2,cInvDefine3,cInvDefine4,cInvDefine5,cInvDefine6,cInvDefine7,cInvDefine8,cInvDefine9,cInvDefine10,cInvDefine11,cInvDefine12,cInvDefine13,cInvDefine14,cInvDefine15,cInvDefine16
from
currentstock inner join inventory on currentstock.cinvcode=inventory.cinvcode inner join warehouse on currentstock.cwhcode=warehouse.cwhcode where warehouse.cwhcode='1' and isnull(inventory.dEDate,'')='' AND bsale=1 and isnull(bStopFlag,0)=0 AND ISNULL(bGspStop,0)=0 and ((isnull(cbatch,'')='' and (( ISNULL(iQuantity,0) - ISNULL(fOutQuantity,0)) >0 or (ISNULL(iNum,0) - ISNULL(fOutNum,0))>0)) or (isnull(cbatch,'')<>'' and (cast( ISNULL(iQuantity,0) - ISNULL(fOutQuantity,0) as decimal(20,2)) >0 or cast(ISNULL(iNum,0) - ISNULL(fOutNum,0) as decimal(20,2))>0)))
ORDER BY inventory.cInvCode,dVDate,autoid
|
|