The Case for Scalar-valued, User-defined Functions in T-SQL
Did you know that scalar-valued, user-defined functions can be used in DEFAULT/CHECK CONSTRAINTs and computed columns? Learn about it...
2015-05-12
7,289 reads
Did you know that scalar-valued, user-defined functions can be used in DEFAULT/CHECK CONSTRAINTs and computed columns? Learn about it...
2015-05-12
7,289 reads
Today we’re going to try to extend some advice that I once heard from SQL MVP Jeff Moden, which I...
2015-05-04 (first published: 2015-04-23)
9,234 reads
Today’s blog will be the first in a multi-part series on replicating Excel functions in T-SQL, starting with HARMEAN, GEOMEAN...
2015-04-29
2,310 reads
Today we’ll learn how you can use T-SQL to calculate your zodiac sign from your birthdate.
“Heeeeeere’s Johnny!” – Ed McMahon introducing...
2015-04-16
1,347 reads
Back in 2013 I wrote an article kindly accepted for publication on the Simple Talk web site called Calculating the...
2015-04-08
879 reads
If you've never encountered this quirk of the SQL UPDATE statement, you should take a look and find a simple way around it.
2015-04-06 (first published: 2013-09-09)
27,835 reads
Since Easter is nearly upon us, I got to thinking once again about how challenging it is to calculate the...
2015-03-31
3,723 reads
When effective end dates don't align properly with effective start dates for subsequent rows, what are you to do?
2015-03-24
10,627 reads
It is a “common knowledge” among SQL practitioners that VIEWs don’t perform well. Recently during an application’s development I put...
2015-03-20 (first published: 2015-03-12)
8,924 reads
“Heeeeeere’s Johnny!” – Ed McMahon introducing Johnny Carson for the Tonight Show
If you’re old enough to remember the Tonight Show hosted...
2015-03-19
771 reads
Disclaimer: The following is built with Claude Code. Just need to justify my $100/mo...
By Brian Kelley
I developed these rules a while back, before COVID. I had a period of...
By Steve Jones
Someone asked why I would use TRY_PARSE after I posted a question at SQL...
I have a table that ends in ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]. I'm about to...
Comments posted to this topic are about the item OUTER APPLY Fundamentals: Part 2
Comments posted to this topic are about the item Building Great Software
I have this data in the OrderHeader table in a SQL Server 2025 database (ordered by CustomerID ASC):
orderid orderdate customerid complete 3 2025-05-10 00:00:00.0002 1 21 2024-01-10 00:00:00.0003 1 15 2023-10-28 00:00:00.0004 1 13 2025-03-08 00:00:00.0006 1 11 2024-04-02 00:00:00.0007 1If I run this query, how many rows are returned?
SELECT * from dbo.OrderHeader where customerid between 3 and '6'See possible answers