Scripts

Technical Article

tighter approach to counting strings in strings

Saw Mike's routine for counting occurences of a string in a string and I thought I'd offer a simpler solution.Simply replace the occurence with null and use length differences as shown.NOTE: len may ignore trailing spaces, so this can be made more solid by adding some non printable char (less likely to interfere with operation) […]

You rated this post out of 5. Change rating

2004-03-10

98 reads

Technical Article

Count number of strings within a string

This function will return the number of occurrences of one string within another string. I was looking for something like this recently, and the only thing I could find was needlessly complicated. Don't forget, when calling a scalar function, you must qualify with username like this:Select dbo.StringCount('Hi There','e') This function may be a little too […]

You rated this post out of 5. Change rating

2004-03-09

368 reads

Technical Article

Kill all SPIDs with a certain user ID

This script is used to disconnect all connections by a particular individual to a server. I use it when I have to disconnect somebody and they have too many processes to do it by hand. Normally, you can just connect the offending process, but if there are multiple processes that are causing a problem , […]

You rated this post out of 5. Change rating

2004-03-08

2,876 reads

Technical Article

Retrieve Index Information For All Tables - V2

This is an update to sp_helpindex, it allows you to pass the table name and whether you want to retrieve clustered, nonclustered or primary key indexes for a table. Using the sp_msforeach table will allow you to do this for all tables in a database. Inserting the data into a table will allow you to […]

You rated this post out of 5. Change rating

2004-03-04

1,037 reads

Blogs

When Your Microsoft Fabric Capacity Runs Out: Optimize, Scale Up, Scale Out, or Isolate?

By

Microsoft Fabric makes it wonderfully easy to put many analytics workloads on one platform....

Accessing the Data API Builder MCP Server from VS Code

By

I recently started playing with the MCP Server for SQL Server, which is a...

From DBA or Data Engineer to AI Engineer: A Realistic Path

By

If you spend your days tuning queries, managing pipelines, or keeping a production database...

Read the latest Blogs

Forums

Alamat BCA KCU PURWOKERTO Tlp:0817825533

By layanan_Bca88

WA CS 62817825533 Alamat Jl. Jend. Sudirman No.391 A, Brubahan, Purwanegara, Kec. Purwokerto Tim.,...

Alamat BCA KCU SOLO BARU Tlp:08217555651

By m4rt1n4

WA CS 628217555651 Alamat Kawasan Terpadu The Park, Jl. Ir. Soekarno, Solo Baru, Madegondo,...

Alamat Kantor BCA KCU CILACAP Tlp:08218154374

By R4nt4u

WA CS 628218154374 Alamat Jl. Jend. Ahmad Yani No.118, Sidakaya Dua, Sidakaya, Kec. Cilacap...

Visit the forum

Question of the Day

BIT_COUNT() V

What does this return on SQL Server 2025?

select bit_count(null)

See possible answers