Miscellaneous

Technical Article

PACK() user defined function

  • Script

Convert a decimal number to IBM EBCDIC packed decimal format.  If for some reason you need to export a number to IBM systems in native format, you can define a SQL Server field as binary(8) and Pack() your decimal number into it.  Then IBM mainframes and COBOL/CICS systems can read the numbers from your data […]

5 (1)

You rated this post out of 5. Change rating

2002-12-04

539 reads

Technical Article

Script to determine backup finish times

  • Script

SQL Server provides the RESTORE HEADERONLY command which helps users determine backup completion times.  What if you have the need to use this completion time for comparison, perhaps to set up a job that only restores the file if it is xx hours old.  This script can be used to determine the maximum backup finish […]

You rated this post out of 5. Change rating

2002-12-04

406 reads

Technical Article

Convert a number to words

  • Script

This is a handy function that converts a  number (integer) into its word format.  This might be handy if you need to print a check formatted number in words.  Currently it supports an integer but it would be almost nothing to convert to support a bigint or decimal.The components are1) a table named PlaceValue that […]

You rated this post out of 5. Change rating

2002-12-04

356 reads

Technical Article

Dependencies on a specific table column

  • Script

SQL Server provides a built-in stored procedure, sp_depends, that returns object dependencies.  Recently, I discovered a need for determining dependencies on a table column, not just the table itself.  For example, a table may be referenced by many stored procedures and views, but a specific column in that table may only be referenced in a […]

5 (1)

You rated this post out of 5. Change rating

2002-12-03

3,187 reads

SQLServerCentral Article

Connecting With Perl Using Win32 : ODBC

  • Article

Perl has been a popular language for Unix administrators for years. It is flexible, easy to learn, and capable of doing some very powerful things with relatively few lines of code. In this article by Brian Kelly, he shows you how to connect to SQL Server via Perl.

3.67 (3)

You rated this post out of 5. Change rating

2006-07-28 (first published: )

42,229 reads

Technical Article

Add Check Digit (LUHN)

  • Script

If you ever need to create a credit card like number this stored procedure is for you.Most credit cards contain a check digit, which is the digit at the end of the credit card number. To generate the check digit, the LUHN formula is applied to the number. To validate the credit-card number, the check […]

You rated this post out of 5. Change rating

2002-11-30

4,243 reads

Technical Article

Check user activity

  • Script

This stored procedure is another monitoring utility that can be executed periodically as a sql server agent job. The procedure checks if there are any open connections, and if there was any recent user activity within a given period of time in a given (or any) database by a given (or any/any except given) login […]

You rated this post out of 5. Change rating

2002-11-30

1,290 reads

Technical Article

Remove old DTS Package versions

  • Script

This Procedure is what I use to clean out all the old DTS package version on my server periodically. You just place it in the msdb database and run it as you need to.Note: Although I have never had an issue with it, I do suggest backup msdb database beforehand, just in case you wack […]

5 (1)

You rated this post out of 5. Change rating

2002-11-30

313 reads

Blogs

The CDO’s Playbook for AI Driven Decision Making

By

The New Arena of Leadership The role of the Chief Data Officer is no...

sp_snapshot – The easy way to take database snapshots of one or more databases – V3.0

By

Presenting you with an updated version of our sp_snapshot procedure, allowing you to easily...

SELECT *

By

SELECT * feels convenient, but in SQL Server it bloats I/O, burns network bandwidth,...

Read the latest Blogs

Forums

combining a param value with widcards in a foreach loop files property

By stan

Hi, it isnt clear from the web if something like this should work as...

Extract sql data in psh

By Sqladmin1

# Load ImportExcel module Import-Module ImportExcel -ErrorAction Stop # File paths $outFile = "C:\Reports\SQLReport.xlsx"...

caught off guard by some greek lettering in a warehouse feed

By stan

Hi we run 2019 standard.   Our warehouse's ssis based etl is klunky but so...

Visit the forum

Question of the Day

Vector Datatype

The new Vector datatype in SQL Server 2025 is a binary type that has a few parameters. What parameters are required?

See possible answers