Scripts

Technical Article

Resize data file manually to prevent downtime

This script will resize the data file of a passed in database name and filename by 10%. It can run in 3 modes.Resize, INFO, HELP. RESIZE is passed into parameter @Mode when we know the database name and file we wish to resize. INFO is passed in when we only know the database name and […]

You rated this post out of 5. Change rating

2003-06-19

648 reads

Technical Article

Height Format Function

This function takes a decimal representation of a height value and returns a properly formatted string value.                     For example, a height of 5 feet 9 inches, which would be passed in as the decimal 5.90, would be returned as 5'9".                     Similarly, a height of 4 […]

You rated this post out of 5. Change rating

2003-06-18

1,619 reads

Technical Article

SPLIT function

This is a port of the SPLIT function from Perl (or VBScript). It works the same way: pass a string anda separator, up to 4 characters long (you can change this),and the function returns a table with the elements.This version trims leading and trailling spaces of the elements, just for convenience.Example:SELECT    strvalFROM    master.dbo.SPLIT('a and b', […]

5 (1)

You rated this post out of 5. Change rating

2003-06-13

212 reads

Technical Article

Search all objects in all DBs for code fragments

This procedure allows you to search through all objects in all databases on your server for words/phrases in your object code.  Very handy for cases in which, for example, a column name on a table has been changed and you need to search your entire server for any sprocs/views/etc. that might reference it.Syntax: [EXEC] sp_FindCodeStr […]

You rated this post out of 5. Change rating

2003-06-10

258 reads

Technical Article

detect different datatypes

-  a simple and handy script that finds what differences might exists between the fields in your database that have the same name.I was wondering why my execution plans where different  for tables with the same  field names and the same indexes,statistics etc... because the syetem was converting my fields in the WHERE statement. -  […]

You rated this post out of 5. Change rating

2003-06-08

104 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

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

Grant user read-write permission to a single database

By PJ_SQL

Hello! How do I grant a user to read-write to a single database and...

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