Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> How to modify the view to set one field with min value of its field
Now, after running the orginal view, i will have records with same
db_tran_id and those may have different a.ADUIT_DATE.
But, I want to make them have the min a.AUDIT_DATE for all records with
same_tran_id when select from the view:
Anyone can help me for the following
Original View
u.user_id,
to_date(to_char(a.AUDIT_DATE,'YYYYMMDD'),'YYYYMMDD'),
to_char(a.AUDIT_DATE,'HH24:MI:SS'), a.DB_ACTION, a.db_tran_id,
a.topic, a.topic_key, a.subtopic, a.subtopic_key, fd.description, fd.seq_no, fd.data_type, default_value,precision, det2.text_1 as value1, det2.text_2 as value2 from sds_audit_log a, scs_user u, sds_audit_log_detail det1, sds_audit_log_detail det2, sds_audit_rpt_field fd where a.topic = 'SDS_ROOT_SYMBOL'
and fd.topic = a.topic and fd.subtopic = a.subtopic and fd.keyword = det2.keyword and fd.field_name = det2.field_name
Way to get the min of a.AUDIT_DATE and its db_tran_id