CREATE TABLE #tmp(m_Meter_ID varchar(20),low_Voltage int,num_Attack int,num_DER int,company_id int,aid int,cid int,selfId varchar(25)) INSERT INTO #tmp EXEC Get_Meter_Log_For_Analysis @company_id=@company_Id, @start=null, @end=null select * from #tmp…