Re: select 'top' query??
Re: select 'top' query??
- Subject: Re: select 'top' query??
- From: "Jonathan 'Wolf' Rentzsch" <email@hidden>
- Date: Mon, 22 Mar 2004 15:11:05 -0600
Jonathan Rochkind, email@hidden, wrote:
>My DB will accept SQL of the form:
>
>SELECT TOP 100 column1, column2, etc
>FROM [etc]
>
>To return just the first 100 records, for instance.
Yeah, my database does this as well.
>Has anyone figured out a good easy way to get EOF to send a query
>like this? In a full EO query, not raw rows with hand constructed
>SQL. None of my usual tricks for customizing SQL apply here. Anyone
>have any ideas for something relatively easy?
I've toyed with making this SQL generation implicit by reading a fetch
spec's fetch limit at runtime. I don't see a reason why it wouldn't work,
but I haven't actually attempted it myself.
JDBCExpression.prepareSelectExpressionWithAttributes() coupled with
assembleSelectStatementWithAttributes() -- probably appending
selectString -- looks like the right bottleneck if you're going to try to
pull this off yourself.
| Jonathan 'Wolf' Rentzsch http://rentzsch.com
| Red Shed Software http://redshed.net
| "better" necessarily means "different"
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.