'EOMONTH' is not a recognized built-in function name- SQL Server 2012
12,016
You might be connecting to an instance of SQL Server 2005 from SSMS 2012.
Make sure you select correct server/instance while connecting to Database Engine.
Author by
EverGreen
Updated on June 13, 2022Comments
-
EverGreen almost 2 years
I installed the SQL Server 2012- Developer edition. When I apply SELECT @@version, I get: Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86) Dec 10 2010 10:56:29 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.1 (Build 7601: Service Pack 1)
But when I go to help, then about, It shows that it's SQL Server 2012. I'm trying to use the EOMONTH function and I'm getting an error that the EOMONTH is unrecognizable built in function. Can anybody please help me understand what's going on? Thanks!I'm fairly new to T-SQL.
-
EverGreen over 10 yearsThanks. I just checked and I have 2 instances; one for SQL Server 2005 and the other is for SQL Server 2012. I'm trying to chose the 2012 instance but it won't establish the connection and gives me this error " A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.(Microsoft SQL Server, Error: 2)" Any help is appreciated.
-
Yuriy Galanter over 10 yearsIt's a commonly occurred error, there could be multiple reasons, try Googling exact error message and try found suggestions e.g like this one: blog.sqlauthority.com/2009/05/21/… (it's a 2008 version, but similar logic applies)
-
EverGreen over 10 yearsThanks all. I was connected to the right instance. I restarted my machine and everything works now. Thanks again.