Category Archives: SQL Server Development

Database Size Calculations

This post falls firmly in the category of blocking and tackling, but is a question we all have to answer from time to time: “How big is this database?” Two methods: SELECT     DB_NAME(database_id) AS DatabaseName   , Name … Continue reading

Posted in SQL Server Development, SQL Toolbox | Leave a comment

Recursive Directory Scripting

Inside source control, I have scripts arranged as follows: Drive:/Base/Database/ Drive:/Base/Database/Functions Drive:/Base/Database/Proc Drive:/Base/Database/Tables Etc.. Each script stored can be run multiple times with no ill effect. For example, a table generation script first checks to see that it exists before … Continue reading

Posted in SQL Server Development, SQL Toolbox | Tagged , , | Leave a comment

RePost: Database development mistakes made by application developers

Link Personally, I think this should also include database developers operating on too little sleep and/or too close of a deadline.

Posted in SQL Server Development | Tagged | Leave a comment

XML Modification

XML Modification for fun and profit Continue reading

Posted in SQL Server Development | Tagged , , | Leave a comment

XML Nodes Query

A reminder of how the nodes query works inside Microsoft SQL Server. Continue reading

Posted in SQL Server Development, SQL Toolbox | Tagged , | Leave a comment

Top 20 Programming Lessons

20/20: Top 20 Programming Lessons I’ve Learned in 20 Years – DCS Media. Above is my contribution to the echo chamber. The author sums up quite nicely a lot of what I’ve thought about coding… simple is better, don’t over analyze … Continue reading

Posted in SQL Server Development | Tagged , | Leave a comment

SQL Server Bug – Synonyns

The below bug was driving me crazy a few weeks ago until I figured it out via the power of Google. In short, when your target is on the same server, don’t include the server name. USE [master] GO –Create … Continue reading

Posted in SQL Server Development | Tagged , | 1 Comment

INSERT INTO & Temp Table Creation

At my previous employer, my old boss and I would debate the merits of using “INSERT INTO” to create temp tables. He was against it in all cases, where I would use it when I was exploring a problem, or … Continue reading

Posted in SQL Server Development | Tagged , , , | 2 Comments

SQL_Variant – Real world research

I came across a table for custom data fields that went something like this… Columns: PrimaryKey int EmployeeKey int Datatype varchar(20) intData int varcharData varchar(250) boolData bit numericData float (I laughed as well) dataData datetime (Ugh.) I’m looking at archiving … Continue reading

Posted in SQL Server Development | Tagged , , | Leave a comment

Wildcard Searching

Searching for data with a less-than-desirable amount of instruction, or a vague “it ends in smith” is never fun. However, there are of course a variety of tools that are available to the developers in the world of T-SQL. As … Continue reading

Posted in SQL Server Development | Tagged , | Leave a comment