How to INSERT INTO a temp table the value of a SQL variable
I don't get where my syntax is goig wrong here, I am hoping someone can help me out?
declare @pLevel varchar
set @pLevel = (select cast(serverproperty('productlevel') as varchar(8000)))
print @pLevel
print len(pLevel)
The output is:
S
1
I believe that cast is cutting out the return value, but I am not certain why.
At any rate, all I want to do is INSERT INTO a temp table the value of:
SELECT ServerProperty('productlevel')
Thanks in advance for the help,
Bob