EXCEL VBA SQL update字段的问题
发布网友
发布时间:2022-05-13 23:32
我来回答
共2个回答
热心网友
时间:2023-08-02 16:23
if arr(j, 3) = "Y" Then
Str12 = "放行时间=" & "'" & Date & "'"
sql = "UPDATE [data$] SET " & Str1 & "," & Str2
& "," & Str3 & "," & Str4 & "," & Str5 & ","
& Str6 & "," & Str7 & "," & Str8 & "," &
Str9 & "," & Str10 & "," & Str11 & "," & Str12
& "WHERE 运单号 = '" & arr(j, 1) & " '"
Else
Str12 = "放行时间=" & "'" & " " & "'"
End If
热心网友
时间:2023-08-02 16:24
前面加IF语句,数组不空执行就可以了。