logic problem
while going through a resultset, I get a bunch of records with many fields including date objects. I would like to display only the record with the latest date ? I'm really having trouble coding this.
Thank you
Web Development
while going through a resultset, I get a bunch of records with many fields including date objects. I would like to display only the record with the latest date ? I'm really having trouble coding this.
Thank you
by wls
If this was SQLish in nature, I'd say use the MAX() function across a GROUP BY clause.
If this was programatic in nature, I'd say store the date and a reference to the object; enumerate over the objects, and if the date is greater than the storedone, change the date/reference pair. When you've exhausted the list, you've got the one you're interested in.
by ururya
by vcsekhar007
Just try either max function or try to retieve the data in comparison with sysdate ( current date for oracle )
Lemme know ur comments on this...
by ururya
by ururya
This discussion is closed to new replies.
Sort by Trending