I need to write a TSQL procedure which would perform 4 selects and join results int one dataset. Can this be done?
P.S.
Selects are performed in a loop
EDIT
Here is the schema. I wan't to get N latest points from each Unit which belongs to SOME map.
Maps
   Id
Maps2Units
   MapId
   UnitId
Units
   Id
Points
   Id
   UnitId
   Timestamp