I can't do a group by because it returns *all* the rows grouped by file_dt. I just want the row with the max(file_dt).
Thanks
Thanks
Code:
select convert(varchar,file_dt, 110) + ', ' + convert(varchar, tran_count)
from myTable
where id = 1
and file_dt = (select max(file_dt) from myTable where id = 1 and file_type = 'X')
and file_type = 'X'