June 25, 2008 at 9:45 am
hi
I have to create a view
for the output of a table and stored procedure1
it is explained below.
table name - test1
stored procedure - sp_test1
sp_test1 will result in displaying results.
the number of output columns from the stored procedure matches with the table columns also.
How to create a view for the above situation?
Please help
June 25, 2008 at 11:20 am
You can't create a view with a stored procedure in it.
You can create a proc that will do what you want, but not a view.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
June 26, 2008 at 7:51 am
Yep, GSquared is true.
June 26, 2008 at 8:36 am
in fact you can, it's not a direct way and not recommended for production databases
try this:
create view who as
select * from openrowset('SQLOLEDB','Trusted_connection=yes;Data Source=(local)','exec sp_who') who
go
select * from who
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply