Hello, I have declared two string variables in iReport qurey designer DECLARE @str nvarchar(max), @str1 nvarchar (max); Select @str = ' AND (BondSales_Confirmed <> -1) ', @str1 = ' AND (BondSales_IssueType = ''REGULAR'') '; Now, If I try to execute a query like following: SELECT * from t_BondSales WHERE (BondSales_cType <> 'Institute') +@str + @str1 It shows me following error: Error: SQL Problems: Incorrect Syntax near '+' Can anyone please suggest me what is the proper syntax to concatenate string variables in WHERE clause? I can do this in SQL Server 2008 R2, but how to do it in Jasper? In SQL Server, I've done something like this: DECLARE @sql NVARCHAR(MAX) Select @sql = 'SELECT * from t_BondSales WHERE (BondSales_cType <> 'Institute')' +@str + @str1 EXEC sys.sp_executesql @sql //**This line executes the query But I guess, I can not do that in iReport... What should I do?