strings with sql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • or1980
    New Member
    • Nov 2006
    • 3

    strings with sql

    I have the following peace of code
    "where table.field in ('field1', 'field2') ")

    i need to make a string that i can put into my in statement how do i build a correct string to use inside the sql statement
  • willakawill
    Top Contributor
    • Oct 2006
    • 1646

    #2
    Originally posted by or1980
    I have the following peace of code
    "where table.field in ('field1', 'field2') ")

    i need to make a string that i can put into my in statement how do i build a correct string to use inside the sql statement
    Hi. I am assuming that you mean to use this statement in VB.
    Code:
    "WHERE table.field IN ('" _
    & strYourStringHere & "','" _
    & strYourNextStringHere _
    & "')"

    Comment

    Working...