Display COUNT(*) but ONLY TOP 100
Let’s say you have a result set with 5000 records but you want to display only 100 of them and in the same time to display the count of ALL records (5000).
2009-11-20 (first published: 2009-11-05)
2,466 reads
Let’s say you have a result set with 5000 records but you want to display only 100 of them and in the same time to display the count of ALL records (5000).
2009-11-20 (first published: 2009-11-05)
2,466 reads
Split string like ('123,43,5465,6788,1231,111', ',') into table, separator (,) can be more than 1 char
2009-11-19 (first published: 2009-11-05)
1,379 reads
Data compression is a key feature with SQL 2008. This script, can compress all DB objects (partition/non-partitioned) according to Partition Range you specifiy.
2009-11-18 (first published: 2009-11-05)
1,161 reads
2009-11-17 (first published: 2009-11-06)
1,009 reads
This procedure searches for your criteria not only in code, but also in objectnames
2009-11-16 (first published: 2009-10-20)
1,094 reads
Returns records with errors from the default trace ordered by most recent first
2009-11-12 (first published: 2009-10-29)
705 reads
This procedure checks if a mirror treshold exists and wait until this treshold is cleared or after a specified time.
2009-11-10 (first published: 2009-10-23)
501 reads
A useful SQL function to parse a single string with delimited values for the "N"th occurrence
2009-11-06 (first published: 2009-10-15)
1,447 reads
There are times when maintenance plan is too simple to do the job, and SSIS is unreachable for you. Here is a simple stored procedure to help you.
2009-11-05 (first published: 2009-10-09)
1,552 reads
Retrieve consecutive records from the table based the value difference
2009-11-04 (first published: 2009-10-06)
953 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...
Hub Via Wa:628217555651 Alamat Jl. Ahmad Yani No.9, RT.01/RW.05, Marga Jaya, Kec. Bekasi Sel.,...
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
How do I get an MCP server for my SQL Server 2025 database from Microsoft?
See possible answers