SQL Server – Filtering objects in Object Explorer – Management Studio
When you are working on a database with a large number of objects sometimes it becomes a challenge to locate...
2013-05-28
1,031 reads
When you are working on a database with a large number of objects sometimes it becomes a challenge to locate...
2013-05-28
1,031 reads
In earlier version of SQL Server Management Studio (2005, 2008 and 2008 R2) you can show/hide results pane using keyboard...
2013-05-20
1,854 reads
Starting with SQL Server 2005 all tables are grouped into schemas. While creating a table if the schema name is...
2013-05-13
1,830 reads
To identify default data and log directories in SQL Server 2012 you can use SERVERPROPERTY() function. In SQL Server 2012...
2013-05-06
925 reads
By default SQL Server listens on TCP port number 1433, and for named instances TCP port is dynamically configured. There...
2013-05-07 (first published: 2013-05-01)
4,847 reads
There are two different command you can use to check if you are running 32-bit or 64-bit version of SQL...
2013-04-22
1,123 reads
Both Clustered and Nonclustered Indexes have same physical structure in SQL Server. Both are stored as a B-Tree structure in...
2013-04-19
1,946 reads
To import data from an Excel file to SQL Server you can use SQL Server Import and Export Wizard. You...
2013-04-15
29,018 reads
Last time I posted about How you can add date/time to output file name, in which I used xp_cmdshell to...
2013-04-12
2,373 reads
You can export data from SQL Server using BCP command for SQLCMD utility. However, these utilities does not support dynamic...
2013-04-17 (first published: 2013-04-09)
3,607 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