Display Rows Vertically or Alphabetically
Display a row vertically when a table has hundreds of columns to avoid scrolling.
2010-01-21 (first published: 2009-12-30)
3,401 reads
Display a row vertically when a table has hundreds of columns to avoid scrolling.
2010-01-21 (first published: 2009-12-30)
3,401 reads
Accuracy and precision go hand-in-hand. This script helps trim date values to whatever size is stored in a table's column.
2010-01-20 (first published: 2009-12-21)
1,529 reads
This script will adapt ordering of look-up lists by foreign key usage.
2010-01-18 (first published: 2009-12-23)
995 reads
Save all object definitions to a single stored procedure for easy validation
2010-01-14 (first published: 2009-12-18)
793 reads
This function takes a UNC file as a parameter and return the last modified date
2010-01-13 (first published: 2009-12-17)
2,581 reads
This script show a demonstration of how to interst tore Procedure Output in a Table.
2010-01-08 (first published: 2009-12-18)
2,501 reads
2010-01-07 (first published: 2009-12-18)
1,744 reads
This script will break job schedules down into a readable format (msdb.dbo.sysschedules)
2010-01-06 (first published: 2009-12-16)
1,989 reads
Use this script to search for SQL Server logins who use weak password
2010-01-05 (first published: 2009-12-16)
4,438 reads
This script creates scripts to compress all tables and indexes in a database.
2010-01-04 (first published: 2009-12-11)
15,919 reads
By Steve Jones
Here are the resources for my talk at Day of Data Boston. Slides –...
By Steve Jones
I’ve covered the values in a number of previous posts on the Book of...
By Arun Sirpal
When the evidence names the database, it says so. When it doesn’t, it stops....
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