Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    50

    Arrow Unanswered: 'IN' and 'LIKE' together

    Hi,
    How can I use 'IN' and 'LIKE' together in a query.
    I want to do something like below.

    Select *
    from a
    where a.name LIKE IN ('%abc%','%cvb%','%asd%')


    Thanks
    Ishan

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    You cannot. The syntax is:

    Select *
    from a
    where (a.name LIKE '%abc%'
    or a.name LIKE '%cvb%'
    or a.name LIKE '%asd%')

Posting Permissions

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