SyntaxFix
Write A Post
Hire A Developer
Questions
A simpler way to get the machine name without the \InstanceName is:
SELECT SERVERPROPERTY('MachineName')