【发布时间】:2021-09-22 11:06:14
【问题描述】:
我想避免重复什么正确的语法来做这个?
Dim StrInsert As String = "Insert Into Job (Name) Select @OtherInfo30
WHERE @OtherInfo30 not in (select name from job)"
但是从哪里查询错了
【问题讨论】:
-
where not exists (select 1 from job where name=@otherinfo30) -
Dim StrInsert As String = "插入作业(名称)在不存在的地方选择 @OtherInfo30(从名称 =@otherinfo30 的作业中选择 1)" 将 cmd 作为新的 OleDbCommand(StrInsert, CON) cmd。 Parameters.AddWithValue("Name", row.Cells("otherinfo30").Value) 给我语法错误
-
查询表达式“@OtherInfo30 其中@OtherInfo30 不存在(从名称=@otherinfo30 的作业中选择1)”中的错误消息语法错误(缺少运算符)。
-
您将参数定义为不同的名称
-
我得到同样的错误你知道哪里而不是退出的另一种语法
标签: vb.net ms-access datagridview