Scripts

Technical Article

Script to find a particular string in procs/func.

Requirement:I added a parameter to an existing user defined function. This user-defined function was used in many procedures across system. Whenever a parameter is added to a user defined function, then we will have to change the calling of the function and pass the value for the new parameter added. Even though the parameter is […]

You rated this post out of 5. Change rating

2006-04-18 (first published: )

94 reads

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: )

598 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: )

284 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: )

741 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: )

2,016 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: )

392 reads

Blogs

Azure SQL offerings

By

There are three Azure SQL products with so many different deployment options, service tiers,...

T-SQL Tuesday #183 Roundup

By

I hosted this month’s T-SQL Tuesday party with my invitation asking about tracking permissions....

A Little Brainstorming with an AI

By

I was asked to do some a little thinking and brainstorming recently. Rather than...

Read the latest Blogs

Forums

MEMORYBROKER_FOR_RESERVE experience

By tony28

Hi, Does anyone have experience with MEMORYBROKER_FOR_RESERVE ? when suddenly there is somehow constantly...

Moving Database Files

By Ahr Aitch

I just learned that my database was created on my C:\ drive in the...

Migrate MSSQL to MYSQL - Different Servers

By cajun_sql

I am needing to migrate a MSSQL db to MySQL, on a different server...

Visit the forum

Question of the Day

Mixed Backups

I have a complex database with a few filegroups and files. Can I run a backup command like this? (assume file/filegroup names are valid).

BACKUP DATABASE [complex]
    FILE = N'thirdone'
 ,  FILE = N'thirdtwo'
 ,  FILEGROUP = N'second' 
 TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\Backup\complex.bak' 
 WITH NOFORMAT, NOINIT,  NAME = N'complex-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

See possible answers