I'm running MS SQL2008 and I want to store an SQL statement in the DB. The statement works OK in the query window:
However I can't make it in the UPDATE...
fails with "The data types varchar and varchar are incompatible in the modulo operator."
Try this then....
SET LabelQry = 'SELECT * FROM LabelReport WHERE CompanyIdList LIKE ''%''+@CNT+''%'''
answered Sep 09, 2010 at 01:19 AM
Kev Riley ♦♦