VFP select 查询问题 50
以下一段代码:selesum(iif(b011='1',1,0))asb0111,;sum(iif(b011='2',1,0))asb0112,;sum(iif(b011...
以下一段代码:
sele sum(iif(b011='1',1,0)) as b0111,;
sum(iif(b011='2',1,0)) as b0112,;
sum(iif(b011='3',1,0)) as b0113,;
sum(iif(b011='4',1,0)) as b0114,;
sum(iif(b011='5',1,0)) as b0115,;
sum(iif(b012='1',1,0)) as b0121,;
......
当写到超过120个sum...时,运行程序就提示“操作符/操作类型不匹配”,请高手指教!
sele sum(iif(b011='1',1,0)) as b0111,;
sum(iif(b011='2',1,0)) as b0112,;
sum(iif(b011='3',1,0)) as b0113,;
sum(iif(b011='4',1,0)) as b0114,;
sum(iif(b011='5',1,0)) as b0115,;
sum(iif(b012='1',1,0)) as b0121,;
......
sum(iif(b071='5',1,0)) as b0715,;&&这是第120行的sum....
sum(iif(b072='1',1,0)) as b0711,;&&这是第121行
from temp into table hz.dbf
一旦sum...超过120行就出现上述错误,我试过如果把121个sum...的代码即“sum(iif(b072='1',1,0)) as b0711”,插入到上面120行内替换任何一个sum...都不会出现问题,说明与类型错误无关。难道select-SQL语句在vfp6里面有最多120个sum...表达式的限制?但是查帮助说select-SQL可以最多选择255个字段,为啥用了sum函数后就只能120个了? 展开
sele sum(iif(b011='1',1,0)) as b0111,;
sum(iif(b011='2',1,0)) as b0112,;
sum(iif(b011='3',1,0)) as b0113,;
sum(iif(b011='4',1,0)) as b0114,;
sum(iif(b011='5',1,0)) as b0115,;
sum(iif(b012='1',1,0)) as b0121,;
......
当写到超过120个sum...时,运行程序就提示“操作符/操作类型不匹配”,请高手指教!
sele sum(iif(b011='1',1,0)) as b0111,;
sum(iif(b011='2',1,0)) as b0112,;
sum(iif(b011='3',1,0)) as b0113,;
sum(iif(b011='4',1,0)) as b0114,;
sum(iif(b011='5',1,0)) as b0115,;
sum(iif(b012='1',1,0)) as b0121,;
......
sum(iif(b071='5',1,0)) as b0715,;&&这是第120行的sum....
sum(iif(b072='1',1,0)) as b0711,;&&这是第121行
from temp into table hz.dbf
一旦sum...超过120行就出现上述错误,我试过如果把121个sum...的代码即“sum(iif(b072='1',1,0)) as b0711”,插入到上面120行内替换任何一个sum...都不会出现问题,说明与类型错误无关。难道select-SQL语句在vfp6里面有最多120个sum...表达式的限制?但是查帮助说select-SQL可以最多选择255个字段,为啥用了sum函数后就只能120个了? 展开
展开全部
VFP单独表最多250个字段,看看那你的b120,这个是不是类型错了?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
好象是VFP的一段代码不能超过256个字符吧,
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
同意“ 114c - 江湖少侠”意见,sum(iif(b072='1',1,0)) as b0711,这行出错,b072是否是字符型?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
怎么会 sum 那么多个?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询