Subject | Re: [firebird-support] Merging two sets in an SP |
---|---|
Author | Vlad Horsun |
Post date | 2007-10-12T09:19:31Z |
> I want to scan the two sets, fetching an item from each and decidingExplicit CURSORS in FB2's PSQL may help you
> how they match up. As each is consumed, I need to fetch another one
> of that kind, producing in the end a sum of payments within a given
> period.
>
> This is basically a merge problem, but I don't see a way to do it in
> PSQL because it looks to me like you have to read all of one set
> before you can do anything with the other one.
>
> Does anyone have any suggestions as to how this could be done using
> PSQL? Or SQL for that matter, say with an SP or a UDF in the join
> condition?
Regards,
Vlad