Monthly Archives: November 2010

Column Aliases – Why bother?

Column aliases are great because you can make seemingly meaningless column names become more readable and also obfuscate the underlying database structure. They are not mandatory but did you know this… An alias can result in a logical error A … Continue reading

Posted in SQL Stuff | Tagged , | Leave a comment

INSERT INTO @table (without dynamic sql)

A client of mine had some data in a single table but wanted it split in to different identical tables based on some data type. This is a common problem often fixed with the use of dynamic sql. Basically his … Continue reading

Posted in Developer stuff, SQL Stuff | Tagged , , , | 1 Comment

Cannot edit steps in management studio – SQL server 2008 R2

If you start sql server 2008 R2 and open or create a job step then save it then try to open any job step in any job then you will get an error. It looks like this. This is a … Continue reading

Posted in SQL Stuff | Tagged , | Leave a comment

Do not use sysprocesses

If you are regularly using a check on the sysprocesses table to see what is slowing down your sql server, looking for that usual culprit in middle management who absolutely must have access to the database despite the fact that … Continue reading

Posted in SQL Stuff | Tagged , , , | 3 Comments

Altering the type of a column in SQL Server (how to)

Altering the type of a column in SQL Server I regularly come across this problem due to changing specifications. If you create a database for a development team then you will come across this issue. Here’s the sequence. • Creates … Continue reading

Posted in SQL Stuff | Tagged , , , | Leave a comment