Skip to Content
0
Former Member
Oct 30, 2012 at 02:17 AM

What is the best way to handle this job

24 Views

I want to get top two rows based on ACCT_UNIT & order by status_date, if there is only one row on acct_unit, get one row.

IF more than two rows available, want to get the top two rows based on status_date. I have several acct_units available within table.

SELECT ACTIVE_STATUS, ACCT_UNIT, DESCRIPTION, DIRECTOR, STATUS_DATE, OBJ_ID, STATUS_FLAG, SUR_KEY
FROM STSI

Thanks for the helpful info.