Tag: SQL Server 2008
Aggregate of columns, not rows
In SQL Server it is very easy to aggregate a value across many rows. You simply just write something like this: SELECT MAX(SomeColumn) FROM SomeTable This will...
Getting Entity Framework to Pick up on the Auto-generated Part of the Composite Primary Key
In my previous post, I wrote about how to get SQL Server to automatically generate a composite primary key for a table when part of that key is also a foreign...
Composite Primary Keys Including Identity Like Column
I’ve been thinking of a way to organise some data for a multi-tenanted system. As such the database that would be used would have to mark pretty much every...
Optimising clustered indexes in SQL Server 2008
I've just found a script on another blog to go through all the clustered indexes in a SQL Server database and rebuild them in order to reduce fragmentation and...
Different ways to add point data in SQL Server 2008
The spatial data can be added to a table by specifying the column type of geometry or geography. The exact detail of what is in the column can be varied as a...
Spatial References in SQL Server 2008
In SQL Server 2008, each piece of spatial data must be tagged with an SRID (Spatial Reference Identifier). Geometry types can have a SRID of 0 (which means...
Spatial Operations in SQL Server 2008 (Katmai) - Union and Convex Hull
CODE EXAMPLES IN THIS POST WORK WITH THE NOVEMBER 2007 CTP (CTP 5) OF SQL SERVER 2008. Say you would like to create a polygon out of a group of points. One way...
Contradictory messages
While attempting to create a database project in Visual Studio 2008 against a SQL Server 2008 database I got a rather odd error message. The dialog used to...
Inserting geometry through a .NET Application
THIS POST REFERS TO THE NOVEMBER 2007 CTP (CTP 5) OF SQL SERVER 2008 Following from my previous posts ( Getting started with Spatial Data in SQL Server 2008 ,...
Spatial Data in a .NET application
THIS POST REFERS TO THE NOVEMBER 2007 CTP (CTP 5) OF SQL SERVER 2008 Following from my last post about Getting Started with Spatial Data in SQL Server 2008 in...
Getting started with Spatial Data in SQL Server 2008
THIS POST REFERS TO THE NOVEMBER 2007 CTP (CTP 5) OF SQL SERVER 2008 This post is probably going to be a wee bit random. After the running around over the last...
