Returning null while doing max(date).
842894Feb 25 2011 — edited Feb 26 2011HI,
i would like to find the latest paid date for particular period.
select max(paymentdate) last paid,period form table
group by period.
for example
i have two columns with data.
period paymentdate
feb 10/10/2010
feb 9/10/2010
feb null
march null
apr 11/10/2010
apr null
by excuting the above query it is returing following out put which is incorrect if the data has null for the same period it is returnign that row also. what is the best query to return only one row.
period paymentdate
feb 10/10/2010
feb null
march null
apr 11/10/2010
apr null