February 6, 2006 at 10:44 am
Hi,
Is there any function to get the current server name, as the default value when user enter anything in a table.
Thanx
February 6, 2006 at 2:18 pm
@@servername function returns the computer's name that is running SQL Server
SERVERPROPERTY('servername') function returns SQL Server's name
Regards,Yelena Varsha
February 7, 2006 at 5:33 am
Thanx, but I want to use the servername as the default value in my table. but when i used this statement 'select @@servername ' as a default value, it shows same string as the default value in the table.
please help me in this regard.
noman
February 7, 2006 at 2:37 pm
you need to use dynamic sql to insert a variable into a query string.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply