Sunday, 15 January 2012

sql server - Simple SQL query won't work when using an in clause -


field 1 has a value of 183872 but the following question does not return anything < Pre-> Select from in Table 1, where in field 1 ('Abbott, Christina D-183872')

Not only that, you have to use like in what is. Is field 1 also a numeric field? If so, you need to insert / convert to the string:

 select from * select * from table 1 where * '%' + cast like 'Abbott, Christina D - 183872' 1 varchar (10)) + '%'    

No comments:

Post a Comment