×

excel 宏编程 c

问:excel里怎么编写宏代码实现:?用SQL语句删除某个表中的某行,truncate table 后面跟什么语句

admin admin 发表于2022-07-11 09:12:23 浏览99 评论0

抢沙发发表评论

问:excel里怎么编写宏代码实现:


Sub 宏1()
If Cells(4, 15) = 1 Or Cells(4, 15) = 4 Then
Cells(7, 5) = Cells(7, 5) + Cells(7, 18)
Cells(7, 5) = Cells(7, 5) + Cells(7, 18)
‘。。。
ElseIf Cells(4, 15) = 2 Or Cells(4, 15) = 3 Then
Cells(7, 5) = Cells(7, 5) - Cells(7, 18)
Cells(7, 5) = Cells(7, 5) - Cells(7, 18)
’。。。
End If
End Sub

用SQL语句删除某个表中的某行,truncate table 后面跟什么语句


晕,truncate 就是把表清空了,不是删除某一行了
你还是用delete吧
delete from 表名 where 列名=’xxx’

这样来指定某一行
删除之前你可以先
select * from 表名 where 列名=’xxx’
看一眼,是不是你想要删除的数据再执行 delete操作

求翻译 we will scare the spit out of anybody that crosses us


原文八成有错,可能应该是"we will scare the shit out of anybody that crosses us.“

spit 改成 shit. 改了以后就可翻译成

"我们会把背叛我们的人,吓的屁滚尿流。″
-excel 宏编程