1. 定义一个表变量
declare @table table(
ReportType nvarchar(30),ReportPath nvarchar(200),ParaCnt int,DataAreaID nvarchar(3),Alias nvarchar(3),ReliabilityPath nvarchar(200),ReportStartDate nvarchar(10),ReportEndDate nvarchar(11),[subject] nvarchar(100))2. 将存储过程执行的结果放入表变量中
insert into @table exec dbo.prc_ReliabilityRpt_toExp_v2 '2016-9-1','dh',1--3. 从结果集查询
select *from @table where DataAreaID = 'dh' and ReportType = 'Summary' posted on 2016-09-05 11:02 阅读( ...) 评论( ...)