471,117 Members | 1,230 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,117 software developers and data experts.

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     
  2.  
I want to perform a search on that field using the Like function.
Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT *
  3. FROM [myDatabase].[dbo].[myTable]
  4. WHERE recd_number LIKE %2548% 
  5.  
This does not not work. Any ideas? Thanks.
Feb 28 '18 #1
1 982
Rabbit
12,516 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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.