Scripts

Technical Article

Automate renaming columns

This script finds and renames columns that begin with a digit, contains a space, or contains a hyphen, so that it is no longer necessary to put brackets around the column names. This is useful in situations such as when an application doesn't automatically put brackets around column names when passing queries to a SQL […]

You rated this post out of 5. Change rating

2006-04-12 (first published: )

597 reads

Technical Article

script to create default class in VB.NET

The following script creates a class to access the default stored procs created by a previous script I submitted called script to create default stored procs. Please note that this will only work correctly if the stored procs created by my earlier script (script to create default stored procedures) have been created. Have fun

You rated this post out of 5. Change rating

2006-04-03 (first published: )

282 reads

Technical Article

DB to VSS V2

This is an update/improved version of my script that I'm pleased to see is rated in the top 10! It will script off all of your objects in your database and if they differ from the scripted version in your VSS db, automatically check it in. If the object does not exist in VSS, this […]

You rated this post out of 5. Change rating

2006-03-30 (first published: )

740 reads

Technical Article

Script To Create INSERT statements

The following script allows for the scripting of data into insert statement.The user only needs to set the tablename and a query for the data they require scripted and run.Note the script takes into account autonumber primary keys and removes them from the insert statement.Also Note that this script will only work on tables with […]

5 (2)

You rated this post out of 5. Change rating

2006-03-29 (first published: )

463 reads

Technical Article

Update a table column with sequence number

Assume that you already have a table with 1000 rows. Now suppose, after some months, you feel a need to insert a sequence number column in the same table. Here is a script that I have worked out. If you have anyother better way then you are most welcome to comment on the same!

4 (2)

You rated this post out of 5. Change rating

2006-03-28 (first published: )

1,990 reads

Technical Article

Convert Currency to English

Just plug this into your Query Analyser and play. This code is an easier way of converting currency to English which can be altered easily to suit your needs.I found that this script will help in avoiding the storage of Amount in Words everytime an amount is stored in applicatons that require the functionality.

You rated this post out of 5. Change rating

2006-03-27 (first published: )

386 reads

Technical Article

Progressive Sums in T-SQL

A common problem in sql is how to calculate and process, for the current row, information that is based on the results (sum, product, difference, etc) of the rows read so far.A solution (we use) to this problem is to create a self join query based on the primary key using the condition of "greater […]

2 (1)

You rated this post out of 5. Change rating

2006-03-23 (first published: )

413 reads

Technical Article

Improved Move indexes to new file group

This is an improved and expanded version of the previously posted script that moves indexes to a new file group. This version will:1. Create new filegrup and files for indexes2. Script out and recreate indexes on new drive3. NEW* output report to text file4. NEW* Will run with enclosed wrapper for ALL DATABASES ON THE […]

4.33 (3)

You rated this post out of 5. Change rating

2006-03-22 (first published: )

2,010 reads

Blogs

SQL Server Quickie #48 – Azure SQL Managed Instance

By

Today I have uploaded SQL Server Quickie #48 to YouTube. This time I’m talking...

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

A New Word: Ochisia

By

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

Read the latest Blogs

Forums

Export database and tables no table data

By HeftSteady

Trying to move a database from one sql server instance to another on separate...

Package to Project model conversion

By blom0344

Hi All, With previous customer range we were always required to work in the...

Issue with DBMail

By richardmgreen1

Hi all   We've got 3 servers with the same setup for dbmail. They...

Visit the forum

Question of the Day

What's the Ceiling?

What do I get as the results from this code?

SELECT CEILING (999.999), CEILING (-999.999);

See possible answers