Access下SQL语句高手接招:又来两个SQL Server下执行正常但在Access下不能执行的语句!(50分)

D

del520

Unregistered / Unconfirmed
GUEST, unregistred user!
1. Delete Table 考勤表 where 编号 not in (select 编号 from 员工表)
2. Insert into 考勤表 Select * from 员工表 where 编号 not in (select 编号 from 考勤表)
 
. Delete from 考勤表 where 编号 not in (select 编号 from 员工表)
Insert into 考勤表 as Select * from 员工表 where 编号 not in (select 编号 from 考勤表)
try try
 
意思我补充一下,这两条想实现对一个考勤表的更新。
1.删除考勤表中存在但员工表中已删除(没有的)的员工记录。
2.添加员工表中的新员工记录(考勤表中没有的员工)
 
TO DHL2001

第一个搞定了,谢谢。

第二个任然不行。

我试着用:Insert into 考勤表 as AAA Select * from 员工表 where 编号
not in (select 编号 from AAA)

也不行。

都报insert into 语法错误
 
Insert into 考勤表 Select * from 员工表 where 编号 not in (select 编号 from 考勤表)

去掉AS



Insert into 考勤表(编号) Select 编号 from 员工表 where 编号 not in (select 编号 from 考勤表)

把相应字段列出来
 
啊 QuickSilver 高手,救星!上次也是你帮我。谢谢。[:D][:D][:D][^][^][^]

你的第二个方案可以。

不过第一条我也是这样用的不行的(SQL SERVER 下 OK)。
有不有QQ或是MSN可以联系?拜托!
我的qq:136990
MSN:zhbbody@21cn.com
我现在就是用ACCESS练习一个自个工资管理,
经常被这些SQL语句搞晕头脑!
 
抱歉,我的QQ没了
我是校园网,上不了MSN,惨
你可以上DFW来问大家的
关于ACCESS的SQL可以去找Office 97的帮助,office 2000反而没有
 
多人接受答案了。
 

Similar threads

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