• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: select 'top' query??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Urgent: Displaying image from NSData
  • Next by Date: WebObjects Developers Group, New York City
  • Previous by thread: Re: select 'top' query??
  • Next by thread: RE: select 'top' query??
  • Index(es):
    • Date
    • Thread