Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Help in parameters

Author  Topic 

1sabine8
Posting Yak Master

130 Posts

Posted - 2007-11-05 : 03:37:22
hi i need to know what's the syntax in reporting services query in a where statement to get values where comment card name like '%'&@RestaurantName&'%'. This syntax is giving me an error. i need to get the rows where the comment card name contains the restaurant name got from the parameter. can anyone give me the right syntax please?

Will H
Yak Posting Veteran

56 Posts

Posted - 2007-11-05 : 12:43:04
Try replacing your ampersands with + signs.

SELECT *
FROM Comments
WHERE CommentCardName like '%' + @RestaurantName + '%'

---------------------------------------------------------
SSRS Kills Kittens.
Go to Top of Page
   

- Advertisement -