replace still with 1 in 'tab2' for (amount <= 0 or (month1<MONTH(DATE()) and year1<=YEAR(DATE()))) AND no==m.no
;o)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.