using like

  • I would like to see if there are records in my table using LIKE.

    select * from mitmas where mmitno like '%655599972D7%'

    this returns the values i am looking for, would like to know if i can run this for multiple LIKE statments

    i have 600 skus i need to search for.

    i tried

    select * from mitmas where mmitno like ('%655599972D7%','%655599989D7%')

    also tried

    select * from mitmas where mmitno like '%655599972D7%' or like '%655599989D7%'

    doesnt seem to work.

    thanks

  • You need to specify the column's name after the first condition

    select * from mitmas where mmitno like '%655599972D7%' or mmitno like '%655599989D7%'

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply