Miscellaneous

Technical Article

Script to gather informations on databases

  • Script

The script is design to gather informations on the growth of the databases per server (except the system ones).It is collecting in the 'databases' table of the master database for current information and in 'histodatabases' for old ones.It is possible to schedule the stored procedure.The column Serveur is only for gathering information on one server […]

1 (1)

You rated this post out of 5. Change rating

2002-12-17

320 reads

Technical Article

UDF Luhn's formula-credit card number validation

  • Script

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

522 reads

Technical Article

FTP files using SQL stored procedure

  • Script

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'

5 (2)

You rated this post out of 5. Change rating

2002-12-09

4,799 reads

Technical Article

Function to express numeric value in words

  • Script

There is a requirement here to take a number (such as 124995) and express it in words.  We needed a function to do this, as it would be used in an existing document generation system.I have developed the enclosed two functions to do this.  Note that the function does not, currently, cater for negative numbers, […]

You rated this post out of 5. Change rating

2002-12-06

134 reads

Technical Article

zPad() - add leading zeros to a number

  • Script

This user-defined function converts a number to character format and adds leading zeroes to pad the field to a specified length.  useful for displaying SSNs or other numeric fields where the leading 0's are significant but the field is stored as numeric.To use:select dbo.zPad(, )make sure your length includes an extra column for the sign.  […]

You rated this post out of 5. Change rating

2002-12-05

404 reads

Blogs

Friday Flyway Tips: Chaining Commands for State-based Deployments

By

One of the cool things I’ve seen with the new Flyway CLI is that...

A New Word: Querinous

By

querinous – adj. longing for a sense of certainty in a relationship; wishing there...

How to clear the SSMS cache?

By

How to clear the SSMS cache? If you are reading this,...

Read the latest Blogs

Forums

I need help accessing my local SQLExpress

By Rod at work

My PC has been causing me problems for months. I've told my desktop support...

MDX SSAS Calculated measure for last totals + turnovers

By IvanMarkevich

I have a measure with totals for specific dates with the LastNonEmpty aggregation, and...

display bytea image

By Bruin

I moved a table from MsSql to Postgresql that had a field defined as...

Visit the forum

Question of the Day

SQL in an Azure VM Backup

If I use the Azure Backup service for automated backups of my SQL Servers in Azure VMs, how often can I configure log backups? (as of Dec 2024)

See possible answers