I want to retrieve data from stored procedure in table format like normal sql query.
what i have to change?
my procedure is.....
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[agg]
AS
DECLARE @stud int,
@lec int,
@dept varchar(50),
@sem int
select @stud=s.sem_no_stud,
@lec=sum(convert (int,sub.sub_lec)),@dept=d.dept_name,@sem=count(s.sem_id)
from sem_info s,sub_info sub,dept_info d,course_info co
where sub.sdept=d.dept_id and
s.sem_caurse_id=co.co_id and
sub.sub_sem_id=s.sem_id and co.co_id=149
group by d.dept_name,s.sem_id,s.sem_no_stud
return (@stud)
return(@lec)
exec agg;