Jump to content
We've recently updated our Privacy Statement, available here ×

saquib.waheed

Members
  • Posts

    4
  • Joined

  • Last visited

saquib.waheed's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Thanks for the reply Ankur. I've tried your way but somehow, couldn't succeed. So, I tried another way through SQL Server and now it is working. I really appreciate your effort.
  2. Hi Ankur, I edited my question. If you can, please check and suggest me if you have any solution to that. Thanks
  3. HI Ankur, I've tried several times to update my question, but the server isn't allowing me to do this. It shows that, the document is locked and I can't edit that :( Whenever it allows me, I'll update my question. Thanks
  4. 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?
×
×
  • Create New...