    Num,
          (select sum(Datalength(Sign)) from HBQueryAttachSign where QueryID = @QueryID and s.Officer = Officer),
          Sign from
          HBQueryAttachSign as s where
          QueryID = @QueryID order by
          s.Officer asc,Num asc
      end
  return 1
end