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!

Last Transaction Date

SANPATApr 30 2015 — edited May 2 2015

Hi

Oracle Version

Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production

PL/SQL Release 9.0.1.1.1 - Production

CORE    9.0.1.1.1       Production

TNS for 32-bit Windows: Version 9.0.1.1.0 - Production

NLSRTL Version 9.0.1.1.1 - Production

I am trying a Sql Query , where i want to list out all  last record of each productcode  whose closing balance is > 0

Select productcode,trandate,clbal From fgaging  where trandate = ( SELECT MAX(trandate) from fgaging)

   

Table with Records
productcodetrandatecl balance
1000101/04/20145000
1000115/12/20140
1000101/02/20152000
1000211/04/20140
1000215/11/201410000
1000201/02/20150
1000301/04/20140
1000315/12/20140
1000301/02/20152000
Want a Result Like this where both this records last transaction is having closing balance
1000101/02/20152000
1000301/02/20152000

Thanks in advance

Sandy

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 30 2015
Added on Apr 30 2015
12 comments
4,832 views