Scripts

Technical Article

Finding the Nth Maximal Value

This procedure gets a tablename, column and an integer number N as parameters and finds the Nth maximum value of the column's value in a table for example :  running it with 'products', 'UnitPrice' , 13 ,  @reswill get the 13TH largest value of unitprice from products is no such N exist an error message […]

You rated this post out of 5. Change rating

2002-07-10

264 reads

Technical Article

Find Duplicated rows

This is a very simple and small stored procedure which will help you identify repeated rows on any given table.  This is specially useful for situations when you want to clean up a table and add a primary key on it, but you cannot until all duplication is eliminated.  Only two parameter are necessary; table […]

You rated this post out of 5. Change rating

2002-07-08

1,095 reads

Technical Article

Dynamically Alter all your Tables.....

This script allows you to dynamically alter all the tables in your database.  In the script i am building up an alter statement that adds a 'TimeStamp' column a table.If anyone knows a better way to do this kind of thing, feel free to drop me a mail (jamie.moffat@infographics.co.uk)

You rated this post out of 5. Change rating

2002-07-04

777 reads

Blogs

PostgreSQL Support in the Data API Builder

By

Next week I’m at VS Live in San Diego (register and join me) and...

Ten Years of PowerShell

By

Ten years ago today, I filmed a Pluralsight Play by Play on open source...

T-SQL Tuesday #202: 100 Hours

By

It’s time for T-SQL Tuesday again and this is a great prompt to start...

Read the latest Blogs

Forums

Alamat BCA KCP Sudirman Mansion Telp:0821-8200-233

By layanan_Bca88

Telp/WA 62 8218200233 Sudirman Mansion, JL Jenderal Sudirman, Kav. 59 No.77 Lt. G No....

Alamat BCA KCP Tebet Barat 2 Telp:0821-8200-203

By m4rt1n4

Telp/WA 62 8218200203 Jl. Tebet Raya No.25 B Blok CI, RT.1/RW.2, Tebet Tim., Kec....

Alamat BCA KCP Setiabudi Atrium Telp:0821-8200-174

By R4nt4u

Telp/WA 62 8218200174 Setiabudi Atrium, Plaza Setiabudi, Jl. H. R. Rasuna Said No.Kave 62...

Visit the forum

Question of the Day

RegEx Functions II

I have this data in a table in a SQL Server 2025 database:

EmailAddressID EmailAddress
7              dylan0@ADVENTURE-WORKS.COM
8              Diane1@ADVENTURE-WORKS.COM
If I run this query, which row(s) are returned?
SELECT top 10
 *
 FROM person.EmailAddress
 WHERE REGEXP_LIKE(EmailAddress, '^d')
 AND BusinessEntityID IN (7,8)

See possible answers