帮我看看这个简单的SQL语句错在哪里。(100分)

  • 主题发起人 主题发起人 dbgg
  • 开始时间 开始时间
D

dbgg

Unregistered / Unconfirmed
GUEST, unregistred user!
access数据库

update a set icount=
(
select count(id) from b where b.ownum like '%'+mid(a.fnum,1,1)+'%' and b.ownum like '%'+mid(a.fnum,2,1)+'%'
)
where len(a.fnum)=2
 
update a set icount=
(
select count(id) from b where b.ownum like ''%'+mid(a.fnum,1,1)+'%'' and b.ownum like ''%'+mid(a.fnum,2,1)+'%''
)
where len(a.fnum)=2
 
你这也不行啊,更是报错。
 
或者如果能解决下面的sql语句也行。
UPDATE a SET a.iCount = (select count(*) from b)
就这么一个语句,它报错:操作必须使用一个可更新的查询
 
update a set icount=
(select count(id) from b where b.ownum like ''%'+mid(a.fnum,1,2)+'%'' )
where len(a.fnum)=2
 
UPDATE a SET a.iCount = (select count(*) from b)

update a,(select count(*) as nn from b) C set A.icount=B.nn
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
3K
import
I
I
回复
0
查看
2K
import
I
I
回复
0
查看
860
import
I
后退
顶部