Top "Sql-server-2005" questions

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

Why use the INCLUDE clause when creating an index?

While studying for the 70-433 exam I noticed you can create a covering index in one of the following two …

sql-server sql-server-2008 sql-server-2005 indexing
how to increment integer Columns value by 1 in SQL

My questions is how to increment a column's value by 1. For example, suppose a column ID has values 1,2,3,4, .. Now when …

sql-server-2005
How can a LEFT OUTER JOIN return more records than exist in the left table?

I have a very basic LEFT OUTER JOIN to return all results from the left table and some additional information …

sql sql-server sql-server-2005 tsql
How to strip HTML tags from a string in SQL Server?

I've got data in SQL Server 2005 that contains HTML tags and I'd like to strip all that out, leaving just …

html sql sql-server string sql-server-2005
SQL Query to add a new column after an existing column in SQL Server 2005

I need a SQL query which add a new column after an existing column, so the column will be added …

sql sql-server sql-server-2005
How to connect to SQL Server from another computer?

I want to connect from home using SQL Server 2005 to another PC. I had a look on the msd...but …

sql sql-server-2005 sql-server-2008 sql-server-ce
SQL Server - transactions roll back on error?

We have client app that is running some SQL on a SQL Server 2005 such as the following: BEGIN TRAN; INSERT …

sql sql-server sql-server-2005 transactions
How to get difference between two rows for a column field?

I have a table like this: rowInt Value 2 23 3 45 17 10 9 0 .... The column rowInt values are integer but not in a sequence with …

sql sql-server tsql sql-server-2005
Referring to a Column Alias in a WHERE Clause

SELECT logcount, logUserID, maxlogtm , DATEDIFF(day, maxlogtm, GETDATE()) AS daysdiff FROM statslogsummary WHERE daysdiff > 120 I get "invalid column name …

sql sql-server tsql sql-server-2005
Decimal values in SQL for dividing results

In SQL, I have col1 and col2. Both are integers. I want to do like: select col1/col2 from tbl1 …

sql-server sql-server-2005