关于ACCESS数据库临时表的问题~
If rct.EOF Then
strsql = "create table cs_temp( " & _
" cname varchar(50), " & _
" cbir datetime, " & _
" cwork varchar(50), " & _
" cdan varchar(50), " & _
" cdtime datetime, " & _
" cctel int, " & _
" cliwu varchar(50)) "
runsql (strsql)
strsql = "insert into cs_temp " _
& " select a.cname,a.cbir,a.cwork,a.cdan,b.cdtime,b.cctel,b.cliwu from cs_info a right join cs_ding b on b.ctel=a.ctel where a.cname= ' " & Trim(Text1.Text) & " ' and b.cdtime= ' " & DTPicker1.Value & " ' "
runsql (strsql)
Else
strsql = "delete from cs_temp "
runsql (strsql)
MsgBox 2
strsql = "insert into cs_temp " _
& " select a.cname,a.cbir,a.cwork,a.cdan,b.cdtime,b.cctel,b.cliwu from cs_info a right join cs_ding b on b.ctel=a.ctel where a.cname= ' " & Trim(Text1.Text) & " ' and b.cdtime= ' " & DTPicker1.Value & " ' "
runsql (strsql)
MsgBox 3
strsql = "delete from cs_info where cs_temp.cname=cs_info.cname " '我这里想删除CS_INFO表中关于cs_temp(临时表)里相同的数据 语句应该怎么写~~
If runsql(strsql) = True Then
MsgBox a
End If
End If
[解决办法]
ACCESS和MSSQL的语法有一些不同