Like funtion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sc5502
    New Member
    • Jun 2014
    • 102

    Like funtion

    I have a table that is still SQL 2005. This table has a field defined as an int

    Code:
    RECD_NUMBER	int
    I want to perform a search on that field using the Like function.
    Code:
    SELECT *
    FROM [myDatabase].[dbo].[myTable]
    WHERE recd_number LIKE %2548%
    This does not not work. Any ideas? Thanks.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    The LIKE operator only works on strings, you'll need to convert both sides of the operands to strings

    Comment

    Working...