Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Tricky query
techsup_at_mindspring.com (James Williams) wrote:
The below works thanks to Thomas Kyte!
select * from
(
select source_order_nbr, ky_prem_no, dte, time,
destination_app_id, record_type, record_sub_type, record_function,
record_sequence_nbr,work_group_id,work_order_nbr, order_completion_dte,order_type,action_taken, employee_id,comments,last_pay_amount, last_pay_dte,balance_due,due_dte, delinquent_amount,nbr_of_cutoffs,credit_info,row_number() over ( partition by ky_prem_no order by source_order_nbr,to_date( dte||time, 'mm-dd-yyhhmiss' ) DESC ) rn