Scripts

Technical Article

zPad() - add leading zeros to a number

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

396 reads

Technical Article

Convert a number to words

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

309 reads

Technical Article

Find SA password with public role-perm test DBA

Find SA Password (Brute Force) with Public RoleFindSApublic is a brute-force password cracker that requires only public role.Possibilities  returns how many different passwords are possible with 1 up to c characters from a universe of n different characters.Usage:FindSApublic nN is an integer which is the maximum length of the password to attempt cracking.Acknowledgmentsoriginal idea: David […]

You rated this post out of 5. Change rating

2002-12-04

955 reads

Technical Article

PACK() user defined function

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

514 reads

Technical Article

Script to determine backup finish times

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

400 reads

Technical Article

Dependencies on a specific table column

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

2,403 reads

Blogs

Microsoft finally adds Tenant Switcher for Fabric / Power BI

By

Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...

Microsoft Releases Windows 11 ARM ISO – A Game Changer for ARM-Powered Devices

By

Yesterday, Microsoft released the highly anticipated Windows 11 ARM ISO image, marking a major...

Building Effective Data Governance Framework: Top Areas to Focus On

By

The post Building Effective Data Governance Framework: Top Areas to Focus On appeared first...

Read the latest Blogs

Forums

Table Delete

By Bruin

I have a very large table and I'm looking to do a cleanup based...

Creating paginated report where each page is a month in the range selected

By plsh

With in the paginated report I am trying to display on each new page...

Upgrading SSIS and SSRS from SQL Server 2016

By Deni Kusdeni

Hi All, I have plan to upgrade SSIS and SSRS from SQL Server 2016,...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers