FUNCTION  fRegionGetObjectsFromRegionId

Returns various objects within a region given by a regionid

returns a table of two columns
objID bigint -- Object ID from PhotoObjALl,
flag int -- the flag of the object type
(@flag&1)>0 display specObj
(@flag&2)>0 display photoPrimary
(@flag&4)>0 display Target
(@flag&8)>0 display Mask
(@flag&32)>0 display photoPrimary and secondary
thus: @flag=7 will display all three of specObj, PhotoObj and Target the returned objects have flag = (specobj:1, photoobj:2, target:4, mask:8)
Sample call to find all objects in region 75
select * from dbo.fRegionGetObjectsFromRegionID(75,15)

Input and output parameters

nametypelengthinoutpnum
@flagint4input2
@regionIDbigint8input1
flagint4output2
idbigint8output1