@Mark; thanks Mark. I suspected there was no shortcut. Cheers On Sep 22, 12:56 pm, Bob Silverberg <[email protected]> wrote: > I'm not sure I understand the whole id < 3 thing. What exactly is the > business logic here? If you define a o2m in Group, you'll end up with > a collection of id's, which you can choose to sort. Would you be able > to use that collection to fulfill your requirement? > > > > On Mon, Sep 21, 2009 at 10:45 PM, Matthew <[email protected]> wrote: > > > Hi all > > > I'm trying to work out if I can use the readByQuery() method to > > retrieve a sibling record. So I've got record with PK id 3 and I want > > the next one within his group (18). In normal SQL I'd do something > > like; > > SELECT MIN(id) > > FROM table > > WHERE id < 3 > > AND group = 18 > > > The Transfer docs state that you can't use Aggregate Functions which > > rules this option out. So the only other way would be to do; > > SELECT TOP 1 id > > FROM table > > WHERE id < 3 > > AND group = 18 > > ORDER BY id ASC > > > The docs don't state if the TOP or LIMIT command can be used. I tried > > it of course and it threw an error so I'm back to using classic SQL to > > get the id then Transfer to get the object for this id. Just thought > > I'd see if I can do it in one hit? > > > Cheers > > Matthew > > -- > Bob Silverbergwww.silverwareconsulting.com --~--~---------~--~----~------------~-------~--~----~ Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en -~----------~----~----~----~------~----~------~--~---
