Adrian Lynch on databases and SQL

Results 1 - 10 of around 2 in sql

Splitting a string with PATINDEX

In ColdFusion we have a bunch of list functions, but what about SQL?

Queries across linked servers in SQL Server 2005

I wanted to do some quick queries with references to both a dev and staging server. To allow this I add the staging server as a linked server. Here's how.

SQL Server stored procedure template

Whenever I need to create an SP, this is the file I start with.

Plugging the gaps in a position column

When you delete one or more rows from a table you'll have gaps in a sequential position column. Here's one solution.

Reordering rows with a position column in SQL (and a little bit of CF)

One take on reordering data. Given an ID and a direction, we want to reorder rows by updating a position column.