By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,570 Members | 1,646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,570 IT Pros & Developers. It's quick & easy.

Like funtion

100+
P: 102
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
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,430
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.