Hi Baiss.

If you're using Wonder:
NSTimestamp t = ERXEOControlUtilities.aggregateTimestampWithQualifier( ec, 
"TheEntityName", "theAttributeName", "min", null );

If you're using plain ol' WO:
NSArray<NSDictionary<String,NSTimestamp>> a = EOUtilities.rawRowsForSQL( ec, 
"TheEOModelName", "select min(THE_COLUMN_NAME) from THE_TABLE_NAME", new 
NSArray<String>( "someKey" ) );
NSTimestamp t = a.objectAtIndex( 0 ).objectForKey( "someKey" );

If you're lucky, you might be able to just create a regular fetch specification 
and setFetchLimit( 1 ). For some DBs, this will generate an SQL statement with 
LIMIT, but unfortunately I have no idea which WO DB Plugins support this. You 
can try it though.

- hugi


On 17.8.2010, at 15:25, Baiss Eric Magnusson wrote:

> Does anyone know a SQL EOUtilities generation that would yield the earliest 
> record.
> 
> How can I create a search criteria that will return the earliest record in a 
> table ( the records are time stamped with a date, not the creation date but 
> the occurrence date ), without returning a sort of all the records in the 
> table?
> 
> 
> ----
> Baiss Eric Magnusson
> CascadeWebDesign.com
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to