SQL Server: Error al conectar con la BBDD [SOLUCIÓN] error: 40 – Could not open a connection to SQL Server

Aquí encontrarás la solución a: 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. (provider: Named Pipes Provider, error: 40 – Could not open a connection to…

SQL-SERVER 2005 decimales y fechas

¿En Microsoft SQL-SERVER 2005 tienes problemas para formatear números con decimales o fechas? Para obtener una fecha en formato dd/mm/aaaa => 09/01/2008 usa: SELECT CONVERT(VARCHAR(10), CAMPOTABLA , 103) As CAMPOTABLA FROM tabla; Para obtener un número con sólo 2 decimales formato NN.DD => 69.96 usa: SELECT CONVERT(decimal(18, 2), CAMPOTABLA) As CAMPOTABLA  FROM tabla; Para otros formateos, busca…