I am getting an error: plz help me........
Incorrect syntax near the keyword 'select'.
the bold select in the query gets error
select * from (SELECT Ci.iInstNumber AS InstNo,ci.dInstDate AS InstDate, Ci.fInstAmount AS InstAmount
FROM tblChitInstalments ci
WHERE Ci.dInstDate <=@TrDate
select isnull(sum(fAmount),0) as TotalPaid from tblChitReceipts where iRegId=@iRegId and cType='D'