SQL Server Script to Display Job History
Its not always quick and easy in SQL Server to get a full list of the jobs that have been run, when they were run and how long they took. I created the following script to quickly check on the …
Its not always quick and easy in SQL Server to get a full list of the jobs that have been run, when they were run and how long they took. I created the following script to quickly check on the …
Tables, and indexes are organized in SQL Server into 8K chunks called pages. If you have rows that are 100 bytes each, you can fit about 80 of those rows into a given page. If you update one of those …
During my 24 Hours of Pass presentation on Advanced CTE’s today I was asked the question about deleting from a CTE when it uses an EXISTS statement that queries another table. I figured I would create quick blog post to show …
The alternate solution to the Database Corruption Challenge this week was created by Patrick Flynn. This solution is the only solution to successfully recover all the data without using any of the backups. If the challenge had been structured differently …
Database Corruption Challenge Week 7 – Alternate Solution Read more »
Here is how I solved Week 5 of the Database Corruption Challenge. The following steps were tested and confirmed working on SQL Server 2008R2, SQL Server 2012, and SQL Server 2014. To oversimplify, here are the steps: Restore the …
Congratulations to Randolph West who won the corruption challenge this week with the following solution which restored all of the data. First he restored the database to get started. Note some of his code and comments have been reformatted to …
Corruption Challenge Week 4 – The Winning Solution Read more »
Here is a short video tutorial that shows how to use the CHOOSE function in T-SQL on SQL Server 2012, SQL Server 2014 or Newer. This was originally part of my free SQL query training for the 70-461 certification exam. Here …
Here is a short video tutorial that shows how to use the COALESCE function in T-SQL on SQL Server. This was originally part of my free SQL query training for the 70-461 certification exam. Here is the first sample code …
In SQL Server the cursor is a tool that is used to iterate over a result set, or to loop through each row of a result set one row at a time. It may not be the best way to …
T-SQL: A Listing Databases Example Using a Cursor Read more »
Click on the grid to enlarge, then print it. Find the following words in the grid up, down, left, right, horizontal, vertical, and diagonal. ROWS RANGE PRECEDING FOLLOWING UNBOUNDED IIF CHOOSE OFFSET FETCH FORMAT CONCAT SEQUENCE PARSE TRYPARSE …
SQL Sunday Fun – Word Search with New T-SQL 2012 Functionality Read more »