Who did what?
This select will show the last sql statement for every open session plus many helpfull information.
2012-01-13 (first published: 2008-03-04)
4,245 reads
This select will show the last sql statement for every open session plus many helpfull information.
2012-01-13 (first published: 2008-03-04)
4,245 reads
Display row value as a TABLE column using SQL select statement
2012-01-12 (first published: 2007-10-26)
4,744 reads
2012-01-11 (first published: 2008-04-16)
5,181 reads
Using this script you can create a list of sql commands for foreign keys manipulation.
2012-01-10 (first published: 2007-11-02)
5,445 reads
2012-01-09 (first published: 2007-11-13)
4,934 reads
2012-01-06 (first published: 2008-02-15)
7,326 reads
2012-01-05 (first published: 2011-12-09)
2,594 reads
Script to restore the LATEST full and differential backups from a SQL Server 2008 R2 backup device.
2012-01-04 (first published: 2011-12-13)
2,210 reads
This script will be useful to quickly check incase of any blocking or log wait occurs
2011-12-30 (first published: 2011-12-05)
1,546 reads
The following script can be used to determine the list of enabled SQL Agent Jobs, their start time, average run duration and next run date.
2011-12-29 (first published: 2011-11-30)
2,192 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