Scripts

Technical Article

Display Database, File, Free and Total Disk Space

This script displays the size of each SQL Server database and database file plus the size of the next extension that will be added to each file. It also displays on each line the total and remaining free disk space for whichever disk each database file is stored on.The output is nothing fancy, and could […]

1 (1)

You rated this post out of 5. Change rating

2003-07-30

1,309 reads

Technical Article

Pad Number

A simple UDF for padding out numbers with a specific character (eg: pad 3 to show as 003).Usefull when you can only sort as a text item or for formatting purposes.Script is similar to the SPACE() function but allow the padding character to be defined.Usage:dbo.padNumber('string to pad', padsize, padchar)eg:SELECT dbo.padNumber('53', 4, '0') as testNumReturns:testNum-------0053

You rated this post out of 5. Change rating

2003-07-25

200 reads

Technical Article

Zip Code Radius Search

Enter the starting zip code and the number of miles for a radius search and the SP will return all the zip codes within the number of miles specified.The data file can be found at http://www.census.gov/tiger/tms/gazetteer/zips.txtThe record layout van be found at http://www.census.gov/tiger/tms/gazetteer/zip90r.txt

You rated this post out of 5. Change rating

2003-07-24

2,383 reads

Technical Article

Generic paged data like MySQL LIMIT

This works, however code is creating a live temp_1 table in the database instead of using a #temp_1 temporary table because is just would not work.The next idea I had was to use a unique table name per connection for temp_1, but I would really rather use temporary tables.I am hoping some SQL guru's can […]

You rated this post out of 5. Change rating

2003-07-22

122 reads

Technical Article

An alternative to self-joins

Oftentimes there is a need to retrieve different types of the same object (e.g. contacts).  For example, in a Contacts database, you might have a Contact table containing many different types of contacts (employees, customers, suppliers, etc).  Typically, a user might need to see a report of all different types of contacts for an order […]

You rated this post out of 5. Change rating

2003-07-18

712 reads

Technical Article

Check if someone use a database or not

I manage quite a few hundred databases across the company. Time to time I get a question if I can check wheather a database is beeing used or not, and if it is, by whom?There are probably a 1000 ways to do this, but I've created a script for creating a scheduled job that runs […]

You rated this post out of 5. Change rating

2003-07-15

2,651 reads

Technical Article

Group numbering

An easy way to organize the data by groups of sequential numbers. This is very helpful for splitting up a large file into numerous smaller files. You can then create the smaller files by filtering for the row number per file.

You rated this post out of 5. Change rating

2003-07-09

219 reads

Blogs

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

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...

Read the latest Blogs

Forums

Slimpal Avis

By slimpalavis

Slimpal est un complément de perte de poids conçu pour soutenir le régime cétogène....

It's The People

By Grant Fritchey

Comments posted to this topic are about the item It's The People

To View or not to View, that is the question...

By pietlinden

I've read lots of the horror stories about nested views in databases where they're...

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