Subject selectable SP
Author Gediminas
have tables:
TourTable : TourID (PK)....
GroupTable: GroupID (PK) , TourID (FK) , ....
GroupMemb : GroupMemID (PK), GroupID (FK), MemID (FK) , ....

Each TourID could have different (under some circumstances) number of
GroupID; each GroupID could also have different number of MemID.

I want to get all TourID information in grid (IBObjects TIB_Grid) so,
that each grid line would represend all GroupMemID with the same
GroupID
(each line shows this group member IDs), result example could be such:
==============================================================
GroupID1 GroupMemID01 GroupMemID02 GroupMemID03 GroupMemID04
GroupID2 GroupMemID05 GroupMemID06 GroupMemID07 NULL
GroupID3 GroupMemID08 GroupMemID09 GroupMemID10 NULL
==============================================================

Would like to write selectable SP, but don't know, how to manage
dynamic output field number (in one case could be into :GroupID ,
:GroupID1, :GroupID2, in an another case - into :GroupID, :GroupID1,
:GroupID2, :GroupID3, :GroupID4).
Is this possible with the FB 1.5?