开发者

SQL Query Select OR using another Table [closed]

It's difficult to tell what is being asked here. This question is ambiguous,开发者_JS百科 vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

How can I make this work ?

strQuery = "
SELECT UNIT_NO,DRIVER1,DRIVER2,PHONENUMBER,PHONENUMBER_2,PHONE1,PHONENUM2
from UNITS
where PHONENUMBER=" & objRS("PHONE") &
  "OR " & PHONENUMBER_2=" & objRS("PHONE") &
  "OR " & PHONE1=" & objRS("PHONE") &
  "OR " & PHONENUM2=" & objRS("PHONE")"

Thanks for any help...


strQuery = "
SELECT UNIT_NO,DRIVER1,DRIVER2,PHONENUMBER,PHONENUMBER_2,PHONE1,PHONENUM2
from UNITS
where PHONENUMBER=" & objRS("PHONE") &
  " OR PHONENUMBER_2=" & objRS("PHONE") &
  " OR PHONE1=" & objRS("PHONE") &
  " OR PHONENUM2=" & objRS("PHONE")


Try surrounding your values with ' characters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜