Hi Naresh,
Possibly one reason is RowCount in General Tab of query template that keep on checking no. of rows returned and does a crop on result.
You need to find a work around to serve the purpose, there are lots of sql server operators you can you to achieve the same.
Thanks and Regards,
Swaroop