Hi,
Can you tell me how can i put the result of an extended
stored procedure into a table?
I've done this by creating the table and then inserting
the result as follows:
create table FreeVolumeSpace(
Drive char(1),
MB_Free int)
insert into FreeVolumeSpace exec master..xp_fixeddrives
but im curious to know how can i do it using the
select into statement.
Best regardsNot quite sure why you want to do it but you can use OPENROWSET to loopback
to your local server e.g.
select a.* into #space
FROM OPENROWSET('MSDASQL',
'DRIVER={SQL Server};SERVER=(local);',
'SET FMTONLY OFF exec master.dbo.xp_fixeddrives') AS a
go
select * from #space
go
drop table #space
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"CC&JM" <anonymous@.discussions.microsoft.com> wrote in message
news:1bee001c45229$986a8130$a601280a@.phx
.gbl...
> Hi,
> Can you tell me how can i put the result of an extended
> stored procedure into a table?
> I've done this by creating the table and then inserting
> the result as follows:
> create table FreeVolumeSpace(
> Drive char(1),
> MB_Free int)
> insert into FreeVolumeSpace exec master..xp_fixeddrives
> but im curious to know how can i do it using the
> select into statement.
> Best regards
No comments:
Post a Comment