The query you used is wrong. This will return independant max values of date and balance. You should use something like...
Code:
Select isnull(max(balance),0) from chinnamaniaccounts where date = ( Select max(date) from chinnamaniaccounts ) AND customerid=' ... ...
Hope that helps.
Cheers.
_________________________
- Vijay G
Strive for Perfection