How to get monthly YTD data
This article presents an easy method to get YTD data grouped by months in T-SQL.
2012-01-24
19,119 reads
This article presents an easy method to get YTD data grouped by months in T-SQL.
2012-01-24
19,119 reads
2012-01-24 (first published: 2010-07-28)
9,792 reads
There are lots of things to think about when you design a physical database. What data types should I use? What column is appropriate for the primary key? Are there particular indexes that I should use to improve performance? How should I implement data integrity rules? This list goes on and on. In this article Greg Larsen will be exploring different physical database design elements.
2012-01-24
3,644 reads
Databases are unique in IT that they are singularly resistant to 'best practice' advice. Any such advice can never be anything other than a starting position for tests in your own environment.
2012-01-23
91 reads
The challenge is to create a query for a report that show expiring material
2012-01-23
950 reads
Step-by-step instructions how to build a stored procedure that dynamically constructs and executes a merge statement within SSIS.
2012-01-23
15,227 reads
In this next article in our series where well-known SQL Server people write about their favorite SQL Server Howlers, we asked Tom Larock for his top five common misunderstandings about how SQL Server works that end in tears, and plaintive forum questions.
2012-01-23
3,823 reads
Do sub query expressions introduce a performance penalty on retrieving large data sets?
2012-01-20 (first published: 2010-07-22)
28,819 reads
XML data can become a full participant in a SQL Server Database, and can be used in views, functions, check constraints, computed columns and defaults. Views and table-valued functions can be used to provide a tabular view of XML data that can be used in SQL Expressions. Robert Sheldon explains how.
2012-01-20
2,557 reads
2012-01-19 (first published: 2010-07-21)
9,146 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