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!

max date records from a table

864099Oct 19 2011 — edited Oct 20 2011
Hi everyone.

I have a table called shipment_refnum

when i use select * from shipment_refnum where shipment_refnum_qual_gid='BM" order by insert_date desc;

For this table max(insert_date) is 03-0ct-11. for above sql it shows many records for shipment_refnum_qual_gid='BM" and inser_date with 03-oct-11.

But when I use the the sql select * from shipment_refnum where shipment_refnum_qual_gid='BM' and insert_date=(select max(insert_date) from shipment_refnum);

it is displaying only one record.

can any one suggest me where i am going wrong.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2011
Added on Oct 19 2011
7 comments
484 views