There is already an object named '#result' in the database
问题 Alter Procedure sp_Member( @comcode int = 0, @SubComCode int = 0 ) as begin set nocount on If @comcode='0' begin select ( select sum(amount) from tbcoudet where memcode=tbm.memcode and expyear=(select max(expyear) from tbexpyear) and exists ( select itemcode from tbitem where comcode=@comcode and SubComCode=@SubComCode and itemcode=tbcoudet.itemcode ) group by memcode,expyear )'TurnOver', * into #result from tbmember tbm where can_flag='N' end If @subcomcode='0' begin select ( select sum