Sql = "Update EgeWst a set ItemType='OTHER' where sonnum>0 and (select count(*) as rsnum from EgeWst where ParentId=a.ItemId and ItemType='INFO')=0 and ItemType='INFO'"Sql = "select ItemId,Manage_Title,ParentId from (select ItemId,Manage_Title,ParentId from EGeWst a where (SonNum>0 and (select count(id) as rsnum from EgeWst where ParentId=a.ItemId and SonNum=0)>0)) order by ItemId"上面这两句是ACCESS下的语句,现在数据库换成SQL server2000了,报错了,'a' 附近有语法错误。
请教高手,我应该怎么改
请教高手,我应该怎么改
解决方案 »
- 表中的字段需要符合几个值
- 子查询返回的值多于一个。当子查询跟随在 =、!=、<、<=、>、>= 之后,或子查询用作表达式时,这种情况是不允许的。
- SQL查询语句
- SQL Server 中有无根据 LCID 获得语言标识符的函数?
- 怎样查询Excel表中特定单元格的内容?
- 昏了,我没备份,只把用户数据库emolument_Data.MDF和LDF文件考出来了,重装SQL后我该怎么恢复?
- 非常低级的问题
- 如何编辑sql的脚本呢?
- 问一个较为棘手的问题,我试了几种办法,但效果不是很好!
- sql server 2000客户端连接到服务器???
- 百度没找到满意的答案
- 大哥救命啊 我在sql server 2005 把复制同步全部设置好了 发现数据没有同步上 求助!
set ItemType='OTHER'
from EgeWst a,(select itemid , count(*) as rsnum from EgeWst where ItemType='INFO' group by itemid) b
where a.ParentId=b.ItemId and a.sonnum>0
Microsoft VBScript 编译器错误 (0x800A0409)
未结束的字符串常量
/buxiugang/webmng/webstruct/Proc_Item_Modify.asp, line 225, column 18
sql="Update EgeWst
Update a set ItemType='OTHER'
from EgeWst
where sonnum>0 and
(
select count(*) as rsnum
from EgeWst
where ParentId=a.ItemId and ItemType='INFO'
)=0
and ItemType='INFO'
select ItemId,Manage_Title,ParentId
from
(
select ItemId,Manage_Title,ParentId
from EGeWst a
where
(SonNum>0 and (select count(id) as rsnum from EgeWst where ParentId=a.ItemId and SonNum=0)>0)
) a
order by ItemId
from EgeWst as a
where sonnum>0 and
(
select count(*) as rsnum
from EgeWst
where ParentId=a.ItemId and ItemType='INFO'
)=0
and ItemType='INFO'
select Top " & lnrange & " ID,TITLE,FSIZE,SHOWFLAG,UPDNAME,UPDTIME,XH,dsnum From (select Top " & (lnRange * p_iUsePage) & " a.ID,TITLE,FSIZE,SHOWFLAG,UPDNAME,UPDTIME,XH,(select sum(DNUM) from WEBODOWN where FID=a.Id) as dsnum from WEBDOWN a " & strSearchLimit & " order by xh desc,UPDTIME asc,Id asc) b order by xh asc,UPDTIME desc,Id Desc
仍然有错误,该怎么改?