Top "Sql-server-2005" questions

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

List rows after specific date

I have a column in my database called "dob" of type datetime. How do I select all the rows after …

sql sql-server sql-server-2008 sql-server-2005
Simulating group_concat MySQL function in Microsoft SQL Server 2005?

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life). In the …

sql sql-server sql-server-2005 string-aggregation
Unable to begin a distributed transaction

I'm trying to run SQL against a linked server, but I get the errors below : BEGIN DISTRIBUTED TRANSACTION SELECT TOP 1 * …

sql-server sql-server-2005 msdtc distributed-transactions
How do I change the owner of a SQL Server database?

When I accidentally click on the Database Diagrams tab, I get one of the following errors: Database diagram support objects …

sql-server sql-server-2005 permissions
Cursor inside cursor

Main problem is about changing the index of rows to 1,2,3.. where contact-id and type is the same. but all columns …

sql sql-server sql-server-2005 tsql cursor
T-SQL: Opposite to string concatenation - how to split string into multiple records

Possible Duplicate: Split string in SQL I have seen a couple of questions related to string concatenation in SQL. I …

sql-server sql-server-2005 tsql
How to Replace Multiple Characters in SQL?

This is based on a similar question How to Replace Multiple Characters in Access SQL? I wrote this since sql …

sql sql-server sql-server-2005 sql-function
How do you copy a record in a SQL table but swap out the unique id of the new row?

This question comes close to what I need, but my scenario is slightly different. The source table and destination table …

sql sql-server sql-server-2005 tsql
Getting result of dynamic SQL into a variable for sql-server

Executing dynamic SQL as follows in Stored Procedure: DECLARE @sqlCommand nvarchar(1000) DECLARE @city varchar(75) SET @city = 'London' SET @sqlCommand = 'SELECT …

sql sql-server sql-server-2005 tsql dynamic-sql
Base64 encoding in SQL Server 2005 T-SQL

I'd like to write a T-SQL query where I encode a string as a Base64 string. Surprisingly, I can't find …

sql-server-2005 tsql encoding base64