On 27.10.2014 10:35, Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support] wrote: > > >>Hi! >> >> I tried this approach before, but it violates my "only run GET_DATA >>once" requirement :-( > > Well, with EXECUTE BLOCK and ORDER BY it may be possible to satisfy your > MIN requirement, but I can't logically understand how it even > theoretically wold be possible to know the SUM before having gone > through all records. Window functions in Fb 3 is probably the best
I don't mind going through the recordset twice, but I do mind creating two recordsets. The temp-table approach satisfies my needs nicely, but I was hoping there is a more elegant solution. > Not that I think it matters too much, I assume the first pass to be more > costly than the second. Have you measured how much more time is required It's not a matter of time. The second pass would generate completely different data (think a random number generator). Josef ------------------------------------ ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------------------------ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: firebird-support-dig...@yahoogroups.com firebird-support-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: firebird-support-unsubscr...@yahoogroups.com <*> Your use of Yahoo Groups is subject to: https://info.yahoo.com/legal/us/yahoo/utos/terms/