April 20, 2005 at 10:00 am
Does anyone know of a way to select the server's IP Address(s) through SQL? Thanks.
-Pat
April 20, 2005 at 10:12 am
create table #T ( data varchar(255))
insert into #T
exec master..xp_cmdshell 'ipconfig'
select substring(data, charindex(':',data,1)+2, len(data) - charindex(':',data,1))
from #T
where data Like'%IP Address%'
hth
* Noel
April 20, 2005 at 10:31 am
Thanks Noel ! That's perfect.
-Pat
April 20, 2005 at 10:51 am
Glad I can help
* Noel
April 21, 2005 at 11:28 am
Very cool, except I don't have sufficient permissions to run it as a developer. I'll have to try it on my laptop some time. Definitely a useful implementation for doing quite a number of things.
-----
[font="Arial"]Knowledge is of two kinds. We know a subject ourselves or we know where we can find information upon it. --Samuel Johnson[/font]
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply