Subject | Re: Merging two sets in an SP |
---|---|
Author | mspencewasunavailable |
Post date | 2007-10-12T10:16:58Z |
--- In firebird-support@yahoogroups.com, Vlad Horsun <hvlad@...>
wrote:
wrote:
>deciding
> > I want to scan the two sets, fetching an item from each and
> > how they match up. As each is consumed, I need to fetch anotherone
> > of that kind, producing in the end a sum of payments within agiven
> > period.it in
> >
> > This is basically a merge problem, but I don't see a way to do
> > PSQL because it looks to me like you have to read all of one setusing
> > before you can do anything with the other one.
> >
> > Does anyone have any suggestions as to how this could be done
> > PSQL? Or SQL for that matter, say with an SP or a UDF in thejoin
> > condition?I think they will. Thanks!
>
> Explicit CURSORS in FB2's PSQL may help you
>
> Regards,
> Vlad
>