Scripts

Technical Article

UDF Luhn's formula-credit card number validation

This UDF will validate a credit card number using Luhn's formula.For example 49927398716 will return 1:print dbo.luhn('49927398716')print dbo.luhn(49927398716)11based on:Credit cards, validation and the Luhn formulabyEduardo Chaveshttp://www.webdevelopersjournal.com/articles/validation.htmlAlgorithm converted to TSQL by Joseph Gama

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-12-12

576 reads

Technical Article

FTP files using SQL stored procedure

This stored procedure takes four parameters1)file to ftp2)server name or IP3)ftp login4)ftp passwordSP will ensure that local file exists before continuing,it will create and execute a batch file in order to push the file to the remote FTP server.--exec exampleEXEC dbo.up_FTPPushFile 'c:\temp\test.txt', 'server', 'user', 'password'

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(2)

You rated this post out of 5. Change rating

2002-12-09

4,915 reads

Technical Article

To find the next available ID

There are times when you have a limited range of ids and these have to be re-used as they become available.The script lists the first missing id in a table.Note that this script works best for a table with a limited number of rows, say sub 100,000I tested this on a PIII 500MHz 256Mb RAM […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-12-09

309 reads

Technical Article

Copying Backups using XP_CMDSHELL

This script is designed to backup the database, and copy it over the network to our backup server.  The requirement for this particular database is 7 days of data kept on the LAN.  The share on the backup server is mapped to the Y:\ drive.  The datename function is used over the datepart function for […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-12-08

377 reads

Technical Article

Dynamic String Compare (W/O the dynamic sql)

Purpose: To compare two strings with a supplied operator and return true if the strings evaluate to true using the operator provided. This is useful for stored procs to use instead of dynamic sql. YAY!  Allowing for the operator and value to be passed in as parms. So that the user on the front end […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-12-07

876 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