SQL: Version 12 of SDU Tools has shipped

SDU Tools is a toolkit that’s simple to use, has many useful functions, procedures, and views, and is updated regularly. Even if you aren’t using the tools as a set, they provide wonderful examples of how to do things in T-SQL. We have released version 12.0 of these popular tools.
The tools are free tools for DBAS and Developers. Tools for comparing databases, tables, finding unused indexes, manipulating strings, performance tuning converting data, and so much more.
This release includes the following new tools (click on any one of them to see a video about it):
ScriptTableAsUnpivot : T-SQL has an UNPIVOT operator that can convert columns in table to rows in the output. The syntax is, however, a little hard to learn. (The same applies to PIVOT). Many people though, want to access standard relational tables as lists of attributes. This tool helps to write code for that, either as queries based on the table’s primary key, or as a view that can be later queried. This can also help if you want to automate the creation of unpivoted views for your tables. If you need to access a standard table like it’s an entity-attribute-value table (list of attributes and values), this tool can help.
NumberToRomanNumerals : We often get odd requests for new tools. For v12, it’s this one. It takes a number (including large numbers), and returns a string representing the number in Roman Numerals.
ListDisabledIndexes : Does what the name says. It lists any indexes that are currently disabled. While these might be intentional, we often find they are accidentally left behind after data load processes, and cause performance problems.
ListUserHeapTables : In SQL Server, a heap is a table that doesn’t have a clustered index. While there are tables that are best structured as heaps, most tables work best with a clustered index, particularly if there are other nonclustered indexes associated with them. What we often find though, is that this happens by accident, not by design. This tool helps to find any tables that are heaps.
ListUserTablesWithNoPrimaryKey : In SQL Server, a primary key is used to uniquely identify a row in a table. It is one or more columns that are both unique and not null. Generally, all tables should have primary keys. This tool helps to find any tables that don’t have primary keys.
SetAnsiNullsQuotedIdentifierForStoredProcedures : This T-SQL stored procedure cleans up ANSI_NULLS and QUOTED_IDENTIFIER settings for one or more stored procedures. It can be used to fix procedures that have been inconsistently defined.
IsWeekday and IsWeekend : These T-SQL functions can be used to determine if a given date is a week day (Monday to Friday) or a weekend (Saturday or Sunday).
We hope you find these tools useful!
2018-10-15