Category Archives: TSQL

Creating test data using TSQL- 4 weeks of CPU stats

To Spoof the creation of SQL creating the CPU stats for the last 4 weeks I used some useful SQL routines, the full code is linked here but the relevant sections are explained in the blog post. These are a … Continue reading

Posted in DataScotland, Tips & Tricks, TSQL | Leave a comment

5 things in 5 minutes presentation- Data & Gravy

It was 2nd year attending the great data event hosted in Leeds (for those who don’t know its near Manchester and not far from Lancashire), last year I did a full hour presentation. This year I wasn’t as organised submitting … Continue reading

Posted in PowerShell, Productivity, SQL Notebooks, Tips & Tricks, TSQL | Tagged , , , , , , , , , , | 2 Comments

Excel formatting SQL results

Sometimes its the little things that get annoying like requesting some information from a DBA or a system admin at a remote site where you can’t run scripts but need someone to do it for you. Quick example you want … Continue reading

Posted in Productivity, TSQL | Leave a comment

Sysadmin Shenanigans & Lying Error messages

One of the databases that is for DBA use was in restricted user mode , this allows only certain users access to the database, basically its sysadmin users , db_owner or db_creater access to the database. I wanted to create … Continue reading

Posted in TSQL | Tagged , , | Leave a comment

Using Output

The OUTPUT command can be a very useful tool to use at times. The following scripts show a couple of ways it can be used. The code from these scripts can be found here on my shared dropbox. First off … Continue reading

Posted in Tips & Tricks, TSQL | Tagged , | Leave a comment