Primary Keys – why accept the defaults.
G’day,
When I design a table in SQL SERVER, I like to have a reasonable understanding of how the table will...
2011-03-19
1,765 reads
G’day,
When I design a table in SQL SERVER, I like to have a reasonable understanding of how the table will...
2011-03-19
1,765 reads
SQL Saturday #70 (Twitter: #SQLSat70) was another successful event! And...I had yet another full house (some even left due to...
2011-03-19
432 reads
One thing I always do lately, whenever I give a presentation is ask the audience how many of them use...
2011-03-18
892 reads
After posting a database tools list yesterday, I found that there were things that I had forgotten and a couple of things that i hadn’t even considered. In thinking...
2011-03-18
8 reads
After posting a database tools list yesterday, I found that there were things that I had forgotten and a couple...
2011-03-18
605 reads
If you are anywhere within driving distance to Columbia, South Carolina, register NOW and then hop in your car Friday...
2011-03-18
441 reads
Earlier this week I took part in the 24 Hours of PASS live webcast event. There were far more questions...
2011-03-18
712 reads
We are in the final stages of prepping for SQL Saturday #70, here in Columbia, SC. We have right around...
2011-03-18
734 reads
I will be teaching two classes for the Spring 2011 Quarter at University College – University of Denver. One will be...
2011-03-18
503 reads
Twin Cities Code Camp will be hitting the University of Minnesota Campus again next month. This is a biannual event...
2011-03-18
590 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