David Poole

David Poole has been developing business applications since the days of the
Commodore Pet.

Those were the days when 8K was called RAM not KEYBOARD BUFFER.

He now works as Data Solutions Architect at Moneysupermarket
  • Interests: Badminton, Cycling and Music. Keen piano player.

Inherriting objects from an updated MODEL database

If new objects are created in the model database then these new objects only get created for new databases.Similarly, if objects are removed from user databases then getting them back into the database can be a pain.The following two stored procs copy objects from model to the current database if they do not already exist.

2003-01-10

30 reads

To find the next available ID

There are times when you have a limited range of ids and these have to be re-used as they become available.The script lists the first missing id in a table.Note that this script works best for a table with a limited number of rows, say sub 100,000I tested this on a PIII 500MHz 256Mb RAM […]

2002-12-09

114 reads

Loop through records without using a cursor

I sometimes have to loop through records in a database and perform a specific action on the value that is returned. For example, In the script below I loop through the user tables in sysobjects and simply print them out. This technique is useful when dropping all indices/triggers on a particular table, or adding WITH […]

3 (2)

2001-11-25

9,144 reads

Blogs

New Blog post- Best practices for migrating Microsoft SQL Server databases to Amazon EC2 using CloudEndure Migration

By

  Check out my new blog post-Best practices for migrating Microsoft SQL Server databases to...

Data Saturday #8–Southwest US

By

I am very excited to announce that I will be speaking for Data Saturday...

Data Weekender v3.1

By

I am super excited about this new version of Data Weekender, coming up on...

Read the latest Blogs

Forums

Cannot attach databases in folder after power outage

By cphite

We had a power outage on one of our hosts, and it unfortunately caused...

Understanding CRUD Operations on Tables with B-tree Indexes, Page-splits, and Fragmentation

By Mohsin_A_Khan

Comments posted to this topic are about the item Understanding CRUD Operations on Tables...

The Number Subquery

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Number Subquery

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers