改成这样试试:
CREATE Procedure [dbo].[P_Report_System]
(
 @where nvarchar(500)
)declare @sql nvarchar(4000)set @sql = 'select * from 表 where 1=1 '+@whereexec(@sql)
goEXEC P_Report_System ' and ecoa.codename = ''C'' '