468,769 Members | 1,856 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,769 developers. It's quick & easy.

Like funtion

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

Expand|Select|Wrap|Line Numbers
  1. RECD_NUMBER    int     
I want to perform a search on that field using the Like function.
Expand|Select|Wrap|Line Numbers
  2. SELECT *
  3. FROM [myDatabase].[dbo].[myTable]
  4. WHERE recd_number LIKE %2548% 
This does not not work. Any ideas? Thanks.
Feb 28 '18 #1
1 916
12,515 Expert Mod 8TB
The LIKE operator only works on strings, you'll need to convert both sides of the operands to strings
Feb 28 '18 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Ye Liu | last post: by
1 post views Thread by Chifo | last post: by
3 posts views Thread by jitu.csewizard | last post: by
6 posts views Thread by Fazana | last post: by
1 post views Thread by sridhard2406 | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.