Top "Sql-server" questions

Microsoft SQL Server is a relational database management system (RDBMS).

Truncate (not round) decimal places in SQL Server

I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding. For example: …

sql sql-server tsql rounding
Set database from SINGLE USER mode to MULTI USER

I need help with setting a database that was restored in SINGLE_USER mode to MULTI_USER. Every time I …

sql sql-server
How to fetch the row count for all tables in a SQL SERVER database

I am searching for a SQL Script that can be used to determine if there is any data (i.e. …

sql sql-server rowcount
List the queries running on SQL Server

Is there a way to list the queries that are currently running on MS SQL Server (either through the Enterprise …

sql-server
How to calculate age (in years) based on Date of Birth and getDate()

I have a table listing people along with their date of birth (currently a nvarchar(25)) How can I convert that …

sql-server sql-server-2005 select date
sql query to return differences between two tables

I am trying to compare two tables, SQL Server, to verify some data. I want to return all the rows …

sql sql-server sql-server-2008 sql-server-2005
How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?

I can't seem to connect to my database from a site. I get this error: Named Pipes Provider, error: 40 - …

sql-server sql-server-2005 database-connectivity
SQL Server: Difference between PARTITION BY and GROUP BY

I've been using GROUP BY for all types of aggregate queries over the years. Recently, I've been reverse-engineering some code …

sql-server tsql aggregate-functions window-functions
How do I find a stored procedure containing <text>?

I need to search a SQL server 2008 for stored procedures containing where maybe the name of a database field or …

sql-server sql-server-2008 tsql stored-procedures
Query to list all stored procedures

What query can return the names of all the stored procedures in a SQL Server database If the query could …

sql-server tsql