ROWNUM for different values of a Field
From: Hareesh <Hareesh.Gunti_at_rapistan.com>
Date: 10 Sep 2001 10:21:49 -0700
Message-ID: <48b2e14.0109100921.3013fecb_at_posting.google.com>
Date: 10 Sep 2001 10:21:49 -0700
Message-ID: <48b2e14.0109100921.3013fecb_at_posting.google.com>
Hi,
I have a table say Table1
with Field1, Field2, FieldDate
Field1, Field2 is the Primary Key
SELECT * FROM (SELECT * FROM Table1 ORDER BY FieldDate) WHERE Field1 = 1 AND ROWNUM < 2;
Gives one Record for Field1 = 1
Similarly for Field1 = 2 and Field1 = 3
Thanks in advance
Hareesh
Received on Mon Sep 10 2001 - 19:21:49 CEST