I have a table (#result) that looks something like this:
unit_number fda_number deferral_days
1 4 25
2 5 10
3 6 75
I want to find the unit_number and fda_number for the unit with the greatest number of deferral_days. I realize the select statement should look something like:
select @deferral_days = max(deferral_days) from #result
But I'm not sure what to put in the where clause to pull the corresponding unit_number and fda_number values...help please?
unit_number fda_number deferral_days
1 4 25
2 5 10
3 6 75
I want to find the unit_number and fda_number for the unit with the greatest number of deferral_days. I realize the select statement should look something like:
select @deferral_days = max(deferral_days) from #result
But I'm not sure what to put in the where clause to pull the corresponding unit_number and fda_number values...help please?