Scripts

Technical Article

Convert Currency to English

Just plug this into your Query Analyser and play. This code is an easier way of converting currency to English which can be altered easily to suit your needs.I found that this script will help in avoiding the storage of Amount in Words everytime an amount is stored in applicatons that require the functionality.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-03-27 (first published: )

421 reads

Technical Article

Progressive Sums in T-SQL

A common problem in sql is how to calculate and process, for the current row, information that is based on the results (sum, product, difference, etc) of the rows read so far.A solution (we use) to this problem is to create a self join query based on the primary key using the condition of "greater […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2006-03-23 (first published: )

455 reads

Technical Article

Improved Move indexes to new file group

This is an improved and expanded version of the previously posted script that moves indexes to a new file group. This version will:1. Create new filegrup and files for indexes2. Script out and recreate indexes on new drive3. NEW* output report to text file4. NEW* Will run with enclosed wrapper for ALL DATABASES ON THE […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(3)

You rated this post out of 5. Change rating

2006-03-22 (first published: )

2,052 reads

Technical Article

Script all indexes as CREATE INDEX statements

this script will generate CREATE index statements for all indexes in the database;there are already scripts out there that script constraints for primary keys and unique constraints, which automatically create an index behind the scenes. but what about the other indexes?uncomment two statements in order to filter out primary keys and Unique indexes so you […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(18)

You rated this post out of 5. Change rating

2006-03-17 (first published: )

30,761 reads

Technical Article

Business Time in Seconds Function

SQL Function to calculate number of business seconds between 2 datetime fields. Input Parameters: @startdate - Start Time (datatype DateTime) @enddate - End Time (datatype DateTime) @starthour - Start of Business Day (datatype DateTime) (Format: '1900-01-01 9:00:00') @endhour - End of Business Day (datatype DateTime) (Format: '1900-01-01 17:00:00') @workdays - Business Day string - Use […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-03-15 (first published: )

258 reads

Technical Article

User Defined Function for Padding Numbers

This scalar udf takes three parameters @Number INT, @Length INT, @Position CHAR(1) and returns a VARCHAR(50) string which pads @Number with zeros to the specified @Length either to the right or to the left, according to @Position ('L' or 'R').E.g. SELECT dbo.udf_PadNumber(5, 6, 'L') returns '000005' whereas SELECT dbo.udf_PadNumber(5, 6, 'R') returns '500000'. The function […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-03-13 (first published: )

175 reads

Blogs

Car Update September 2026

By

Software is hard. While I love our Lucid Gravity, I realize that they are...

Microsoft Tools for Making Data AI-Ready

By

Making Data AI-Ready, Part 2 (This is the second article in a three-part series...

Local Models Using GPUs with Ollama

By

Can you use your GPUs when running a local model under Ollama? You can,...

Read the latest Blogs

Forums

Alamat BCA KCP Bursa Efek Jakarta Tlp:0821°7555°651

By layanan_Bca88

Tlp/Wa 62 8217555651 Gd. Bursa Efek Jakarta, Jl. Jend. Sudirman kav 52-53 Tower II...

Alamat BCA KCP WTC Sudirman Telp:0821.8200.233

By m4rt1n4

Telp/Wa 62 8218200233 World Trade Center I, Jl. Jenderal Sudirman No.Kav. 29, RT.8/RW.3, Kuningan,...

BCA KCP Sampoerna Strategic Square Telp:08218200203

By R4nt4u

Telp/Wa 62 8218200203 Gd. Sampoerna Strategic Square, Jl. Jenderal Sudirman Tower A - Ground...

Visit the forum

Question of the Day

Reserved Words I

Which of these are not reserved words?

See possible answers