首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

sql count 出错,该怎么解决

2012-02-16 
sql count 出错MicrosoftJETDatabaseEngine(0x80040E14)SELECT子句中包含一个保留字、拼写错误或丢失的参数

sql count 出错
Microsoft   JET   Database   Engine   (0x80040E14)
SELECT   子句中包含一个保留字、拼写错误或丢失的参数,或标点符号不正确。

infopl= "select   top   5   count(netz_infopl_infoid)   as   total   netz_infopl_id,netz_infopl_infoid,netz_infopl_lz,netz_infopl_name,netz_infopl_content,netz_infopl_bq,netz_infopl_date   from   netzheng_infopl     where   netz_infopl_infoid= "&id& "   order   by   netz_infopl_id   desc "

[解决办法]
infopl= "select top 5 count(netz_infopl_infoid) as total
————————————————————————————————————
这里是否少了一个逗号
—————————————————————————————————————— netz_infopl_id,netz_infopl_infoid,netz_infopl_lz,netz_infopl_name,netz_infopl_content,netz_infopl_bq,netz_infopl_date from netzheng_infopl where netz_infopl_infoid= "&id& " order by netz_infopl_id desc "

[解决办法]
infopl= "select top 5 count(netz_infopl_infoid) as total,netz_infopl_id
from netzheng_infopl
where netz_infopl_infoid= "&id& "
group by netz_infopl_id "
这样看看

热点排行