ename\... what i need to do is instead of the "computername", i need to put
a variable there to pick the localhost name where the code is runing on.If you're not running a named instance, you could use
declare @.path varchar(255)
select @.path = @.@.servername + '\\sharename'
select @.path
"IT" <anonymous@.discussions.microsoft.com> wrote in message
news:25BA2799-65BB-467A-8F46-39F732B0FB36@.microsoft.com...
quote:
> i have a path line in my code, now, i have in the path
\\"computername"\sharename\... what i need to do is instead of the
"computername", i need to put a variable there to pick the localhost name
where the code is runing on.|||SQL Server should handle the word localhost and/or (local) for the server na
me. Did you try that? If
you want to extract the machine name, you can use the SERVERPROPERTY functio
n (read about it in
Books Online).
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"IT" <anonymous@.discussions.microsoft.com> wrote in message
news:25BA2799-65BB-467A-8F46-39F732B0FB36@.microsoft.com...
quote:
> i have a path line in my code, now, i have in the path \\"computername"\sharename\... what
i need
to do is instead of the "computername", i need to put a variable there to pi
ck the localhost name
where the code is runing on.
No comments:
Post a Comment