Archive for the 'SQL Server' Category

The Intuitive Naming Awards…

I found myself needing to subtract a number of days from a date today in SQL Server. I couldn’t think what the function name was that would do this for me so I speculatively typed in DATESUBTRACT, which obviously didn’t work as there is no such function.

So, I had a shufty around the good ol’ Internet and what did I find?

The function I needed to use to subtract from a date was… yes, you guessed it…

DATEADD

I believe the American phrase ‘go figure’ would be appropriate in this instance…

SQL Server Deployment Goodies…

I just spent most of the afternoon on a pointless keyboard puncher. I only wanted to move a SQL Server Express database from one place to another which is one of those things that should be straightforward but for one reason or another (which I won’t bore you with) it wasn’t and took me a few hours of messing about to get it to work.

So, it was with a mixture of delight and that feeling you get when you find something in the sales for half the price you paid for it last week that I read Scott Guthrie’s post about deploying Sql Server 2005 databases.

Microsoft are on the way to releasing a Database Publishing Wizard (RC1 is available for download now) which scripts both the schema and data of your SQL Server database.

They also provide an aspx page that you can use to install your db when you don’t have full access to the server.

That would have saved me a fair bit of bother this avo…