我在asp.net
中使用VB
实施此查询,该查询的目标是整理除@yahoo.com
和@gmail.com
以外的电子邮件数据,它显示错误:
' @ yahoo'附近的语法不正确和' @ gmail"。
"select * from print_venue where not (email_id like %" & "@yahoo.com" & "%) AND (email_id like %" & "@gmail.com" & "%)"
上述查询有什么问题?
答案 0 :(得分:4)
您忘记了like
声明
"select * from print_venue
where not (email_id like '%" & "@yahoo.com" & "%')
AND (email_id like '%" & "@gmail.com" & "%')"
必须是
email_id like '%@yahoo.com%'
而不是
email_id like %@yahoo.com%