I have declared two variables in RAW sql
DECLARE @str nvarchar(max), @str1 nvarchar (max);
SET @str = " AND (c.BondSales_Confirmed <> -1)";
SET @str1 = " AND (c.BondSales_IssueType = 'REGULAR')";
My SQL query is:
SELECT * From t_BondSales Where (BondSales_cType <> 'Institute') " + str1 + str "
Here I get the following error:
Error: SQL Problems: Incorrect Syntax near "+ str1 + str"
Can any one Please help me with the proper syntax about how to concat String in where clause?