Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

LIKE statement with Parameter Problem

$
0
0
Hi, I am trying to add a LIKE statement to a query in report builder 3.0 with a parameter like the one below. It allows the user to input an ID and returns records that have that id in their list of IDs by using the like statement with wildcards.SELECT CORRIDOR.OBJECTID ,CORRIDOR.STATUS ,CORRIDOR.DIMENSION ,CORRIDOR.WIDTH ,CORRIDOR.IDFROM CORRIDORWHERE ID LIKE '%' + @ID + '%'I get an error "Conversion Failed when Converting the varchar value '%' to data type int"I am not sure why the wildcard is converting to int. my @ID parameter is text. Please help. Thanks!

Viewing all articles
Browse latest Browse all 2791

Trending Articles