Understanding the PIVOT function
The PIVOT function is very useful but not easily understood at first. I thank Itzik Ben-Gan, Dejan Sarka and Ron...
2013-10-25
3,108 reads
The PIVOT function is very useful but not easily understood at first. I thank Itzik Ben-Gan, Dejan Sarka and Ron...
2013-10-25
3,108 reads
I was participating in a Twitter Chat looking at what suggestions and recommendations for developer on how to make the...
2013-10-24
5,030 reads
I came across Vincent Rainardi’s blog, and thought I’d share it with the readers.
Sherry Li and Tomislav’s 2012 MDX Cook...
2013-10-24
913 reads
Microsoft has released SQL Server 2014 CTP2 (download):
What’s new in SQL Server 2014 CTP2?
New Mission Critical Capabilities and Enhancements
Enhanced In-Memory...
2013-10-24
1,826 reads
PowerShell – Disk Space GUI Tool - Sharing a useful PowerShell GUI script to check disk drive usage along with a graph.
Copy and...
2013-10-24 (first published: 2013-10-14)
4,566 reads
A co-worker recently asked me why she would get timeout when updating a column in a big table. This column...
2013-10-24
16,757 reads
When tuning SQL queries, I find that I use the following three SET options quite often.
set showplan_xml on
When showplan_xml...
2013-10-24
1,875 reads
“Psssst….”
“Hey buddy! Yeah, you there in the propeller hat. You’re a SQL nerd, right? Can you help me tune this...
2013-10-24
919 reads
1. How to find the maximum no of connection allowed in SQL Server?
Select@@MAX_Connections
2. How to select top 2 rows without...
2013-10-24
1,096 reads
By Steve Bolton
…………The pinnacle of difficulty in this series of amateur self-tutorials on SQL Server Data Mining (SSDM) was surmounted...
2013-10-23 (first published: 2013-10-15)
2,124 reads
By Brian Kelley
Fabiano Amorim has written an excellent article at Simple Talk on securing msdb. Here's...
By Steve Jones
This month we have a new host, which I am grateful for. So many...
I needed to do some research because there is more to #temp tables than...
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
Comments posted to this topic are about the item The Range of Customers
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