Home Forums SQL Server 2008 SQL Server Newbies Please assist dynamic selection of column not working RE: Please assist dynamic selection of column not working
spaghettidba
SSC Guru
Points: 105732
More actions
October 28, 2013 at 4:47 am
#1661895
You're missing quotation marks around the second WHERE predicate:
contentRepoHandle like % '+@ctype+ '%
should be
contentRepoHandle like ''%'+@ctype+ '%''
The same applies to %pdf%
-- Gianluca Sartori