2019-08-13
2,831 reads
2019-08-13
2,831 reads
I am happy to announce the Redgate Software and I are supporting and taking over stewardship of the SQL Cop project at this point. With permission from its founder, George Mastros, we will host the main repository for the project at https://www.github.com/red-gate/sqlcop. This should be considered the official repository for the code from this point […]
2019-08-13
3,968 reads
2021-01-01 (first published: 2017-08-17)
3,998 reads
In this piece, Steve Jones shows how you can enforce a requirement of a Primary Key (PK) with a unit test, but also allow exceptions where needed.
2016-05-12
1,395 reads
The latest version of tSQLt is now available with some SQL Prompt snippets to help you get started.
2015-07-30
1,772 reads
In this article on tSQLt, learn how you can use the AssertResultSetsHaveSameMetaData method from the framework to enforce your API.
2015-06-11
5,503 reads
This article will give you a basic look at how you can test your user defined functions with the tSQLt framework.
2015-05-18
5,595 reads
Learn how you can use SQLCop to prevent your developers from writing stored procedures that are named sp_ something.
2015-01-15
6,552 reads
2016-03-11 (first published: 2015-01-08)
19,036 reads
There are several frameworks for assisting with the testing of SQL Server databases, but tSQLt is popular because it is written in TSQL and is simple for a database developer to set up and use. It doesn't get in the way. Rob Sheldon shows you how to get started.
2013-05-16
5,333 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
Comments posted to this topic are about the item Split Large Queries in Athena...
Comments posted to this topic are about the item Finding Trailing Spaces
I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:
CustomerID CustomerName PreferredName 1 Steve Steve 2 Andy Andy 3 Brian Brian 4 Allan Allan 5 Devin Devin 6 Steve Steve 7 Sally SallyI want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT
CustomerID,
CustomerName,
PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName); See possible answers