Top "Sql-server-2005" questions

Use this tag for questions specific to the 2005 version of Microsoft's SQL Server.

Declare Variable for a Query String

I was wondering if there was a way to do this in MS SQL Server 2005: DECLARE @theDate varchar(60) SET @theDate = …

sql sql-server sql-server-2005 tsql dynamic-sql
how to insert datetime into the SQL Database table?

How can I insert datetime into the SQL Database table ? Is there a way to insert this query through the …

.net sql sql-server sql-server-2005 c#-3.0
Extracting hours from a DateTime (SQL Server 2005)

I can extract the month and day by using Day(Date()), Month(Date()). I can't extract hours, with HOUR(Date()). …

sql tsql datetime sql-server-2005 hour
How to update two tables in one statement in SQL Server 2005?

I want to update two tables in one go. How do I do that in SQL Server 2005? UPDATE Table1, Table2 …

sql sql-server sql-server-2005 tsql
SQL Server String or binary data would be truncated

I am involved in a data migration project. I am getting the following error when I try to insert data …

sql-server tsql sql-server-2005 migration data-migration
Simple DateTime sql query

How do I query DateTime database field within a certain range? I am using SQL SERVER 2005 Error code below SELECT * …

sql sql-server sql-server-2005 tsql sql-server-2008
Select top 10 records for each category

I want to return top 10 records from each section in one query. Can anyone help with how to do it? …

sql sql-server sql-server-2005 greatest-n-per-group
How can I solve a connection pool problem between ASP.NET and SQL Server?

The last few days we see this error message in our website too much: "Timeout expired. The timeout period elapsed …

.net asp.net sql-server sql-server-2005
How to find sum of multiple columns in a table in SQL Server 2005?

I have a table Emp which has these rows: Emp_cd | Val1 | Val2 | Val3 | Total -------+-------+-------+-------+------- 1 | 1.23 | 2.23 | 3.43 | 2 | 23.03 | 12.23 | 2.92 | 3 | 7.23 | 9.05 | 13.43 | 4 | 03.21 | 78.23 | 9.43 | …

sql sql-server sql-server-2005
How do you kill all current connections to a SQL Server 2005 database?

I want to rename a database, but keep getting the error that 'couldn't get exclusive lock' on the database, which …

sql-server sql-server-2005