select sum(amount) from FirstTable where entrydate is not between (select FromDate,ToDate from SeconTable)
select sum(amount) from FirstTable where entrydate is not between (select FromDate from SeconTable) and (select ToDate from SeconTable)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)