Link to home
Start Free TrialLog in
Avatar of SweatCoder
SweatCoderFlag for United States of America

asked on

capture xp_msver results into temp table

How can I get the results of a system proc into a temp table? I tried this, but it breaks:

select xp_msver Language
into #junk

Yet if you run "xp_msver Language" by itself, it works fine and returns 1 record with a few columns.
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SweatCoder

ASKER

Invalid object name '#temp'.

I was thinking SELECT INTO because that auto-creates the table.
SweatCoder,
> Invalid object name '#temp'.

Did you include the first "Creata table " statement also

> I was thinking SELECT INTO because that auto-creates the table.

You can't do this, you need to create the table first
Sorry, I had missed the 1st line, was in a hurry. :-)
Works great.