Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Custom ranking

HeshJan 6 2012 — edited Jan 19 2012
Can't believe this is troubling me for the last two days !

Following are the transactions happed for a loan
TRAN_ID	FLG	TRAN_DATE	TRAN_CODE	AMT
ADV	N	31-Oct-11		59586455	50
SHD	Y	1-Nov-11		59586568	50
SHD	Y	2-Nov-11		59586570	50
PAY	N	3-Nov-11		59587855	50
SHD	Y	3-Nov-11		59587856	50
SHD	Y	4-Nov-11		59588275	50
PAY	N	5-Nov-11		59588276	50
SHD	N	5-Nov-11		59590669	50
PAY	N	7-Nov-11		59590668	50




I need to group traid:'SHD' and FLG:' Y' records like this..

TRAN_ID	FLG	TRAN_DATE	TRAN_CODE		AMT
ADV	N	31-Oct-11			59586455	50
SHD	Y							100
PAY	N	3-Nov-11			59587855	50
SHD	Y							100
PAY	N	5-Nov-11			59588276	50
SHD	N	5-Nov-11			59590669	50
PAY	N	7-Nov-11			59590668	50
Cound be more better if we can display the date range for tran_date column for SHD(Y) amount like (from 01-oct-11 to 02-oct-11)

Thanks
Hesh.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2012
Added on Jan 6 2012
24 comments
557 views