注册 登录
编程论坛 ASP.NET技术论坛

sql问题求助高手.

liganggggg 发布于 2012-07-30 21:54, 1369 次点击
count1 = (int)Ky.SQLServerDAL.SqlHelper.ExecuteScalar(CommandType.Text, "select count(*) from olddisease where  numofyes >='2' and numofyes <='10' ", (SqlParameter[])null);
这里求数据库内numofyes 大于等于2和小于等于10的个数?求助高手是我语法有问题还是哪错了?万分感谢..........
只有本站会员才能查看附件,请 登录
11 回复
#2
xihajiaojiao2012-07-31 10:49
好像没什么错哦
#3
yetianshi2012-08-02 15:21
报的是啥错吖
#4
烧包谷2012-08-03 09:40
回复 楼主 liganggggg
把2和10的单引号去掉试试!
#5
qq88011032012-08-15 08:50
去确实想问下 LZ你的numofyes字段类型可能有问题,自己查看一下吧
#6
xy32121582012-08-15 17:53
小手一抖10分到手.
#7
yetianshi2012-08-16 14:57
楼上
#8
yetianshi2012-08-20 09:28
再楼上
#9
跳过去2012-08-20 21:04
单引号、、、、
#10
Issac_abc2012-08-31 14:28
numofyes 应该是int 行吧
select count(*) from olddisease where  numofyes >=2 and numofyes <=10
去掉单引号试下。
#11
yzluse2012-09-06 10:54
路过
#12
努力吼2013-03-08 12:02
SqlHelper一般都是自己写啊?还是vs里面自带的啊
1