Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    Unanswered: Paasing a variable using the Like keyword

    Dynamically building a sql statement based on user input.

    Need to use the word LIKE for the last part of the statement

    The variable that needs to be between the single quotes and asterisks is :
    mycrit

    I have tried several snippetts but somethjing is missing. Any help would be greatly appreciated.

    hereis my latest attempt that actually returned the rows for the first part of the statement (not show)

    WorkOrderCostMaterial.ItemNumber like " & "*'" & mycrit & "*'"

    Thanks guys
    Dale Houston, TX

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Code:
    ...& "'*" & user_input & "*'"
    ?
    George
    Home | Blog

  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    Thanks GEO

    I am going to contact you in a couple of days if that is ok - regarding the EXISTS vs IN fir many records.
    Dale Houston, TX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •