Additional Articles


External Article

SQL Server 2008 and 2008 R2 Integration Services - Sort Transformation

SQL Server 2008 R2 Integration Services offer a wide range of pre-built components, which deliver generic functionality commonly required when performing extraction, transformation, and loading tasks. While most of them are fairly straightforward to deploy in their basic form, typically there are refinements or caveats that should be taken into account as part of their implementation. This principle becomes quite evident when considering use cases of Sort transformation, which is the subject of this article.

2012-02-09

2,339 reads

External Article

Rebuilding SQL Server indexes using the ONLINE option

As each year goes by the uptime requirement for our databases gets larger and larger, meaning the downtime that we have to do maintenance on our databases is getting smaller and smaller. This tip will look at a feature that was introduced in SQL Server 2005 that allows us to leave our indexes online and accessible while they are being rebuilt.

2012-02-08

4,386 reads

External Article

Converting String Data to XML and XML to String Data

In general XML documents or fragments are held in strings as text markup. In SQL Server, XML variables and columns are instead tokenised to allow rapid access to the data within. This is fine, but can cause some odd problems, such as ' entitization'. What do you do if you need to preserve the formatting? As usual Rob Sheldon comes to our aid.

2012-02-07

4,207 reads

External Article

Indexing - Take the Hint and Leave it to the Experts

The most common T-SQL command in use has to be the SELECT statement, it is the bedrock of any SQL Professional's day. Sometimes it's used to snatch some data from a table or two while some quick investigation is done, other times it is at the heart of a stored procedure or view that will inform business decisions for coming months or even years.

2012-01-30

4,672 reads

Blogs

Who’s the Winningest Coach (with AI Help)

By

I was listening to the radio the other day and the hosts were discussing...

Learning from Mistakes: T-SQL Tuesday #194

By

We’re a week late, once again my fault. I was still coming out of...

Stupid Things I Did With AI: ASCII Art

By

I ran across this article recently (https://www.gatesnotes.com/meet-bill/source-code/reader/microsoft-original-source-code) and it has a great opening piece...

Read the latest Blogs

Forums

Learning From Breakage

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Learning From Breakage

Python in Action to Auto-Generate an Optimized PostgreSQL Index Strategy

By sabyda

Comments posted to this topic are about the item Python in Action to Auto-Generate...

Adding and Dropping Columns I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Adding and Dropping Columns I

Visit the forum

Question of the Day

Adding and Dropping Columns I

I have this table in my SQL Server 2022 database:

CREATE TABLE [dbo].[CityList]
(
[CityNameID] [int] NOT NULL IDENTITY(1, 1),
[CityName] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
I decide to add two new columns for the StateProvince and Country. What code should I use?

See possible answers