Scripts

Technical Article

Script to sort by columns that may include NULLs

If you sort by in ASC order by column that may include NULLs and empty strings ( if type is varchar), the records with nulls will always appear before any others.This script will show how to chagne this pattern and move all records with NULLs to the bottom of your recordset

You rated this post out of 5. Change rating

2002-05-23

226 reads

Technical Article

Search for a value in a numeric variable list

When you have a variable that hold a comma separated numbers like '1,2,3' and you have a table with a column that has the value that should match a number in that list, you can use this script to avoid building a string and then executing it.You have to convert the columnID to varchar, the […]

You rated this post out of 5. Change rating

2002-05-20

385 reads

Technical Article

SQL Mail Stop and Start

Since SQL Mail periodically stops working and the simplefix is to stop and start it, this script does just that.It can be scheduled to run as a task as often as desiredusing an ISQL command (e.g. isql -U sa -P  -i "e:\dba\mailstopstart.sql" -o "e:\dba\mailstopstart.out")or as a stored procedure.  It has been tested on SQL 6.5 […]

You rated this post out of 5. Change rating

2002-05-16

1,181 reads

Technical Article

Get total file size of backup for last full backup

The information for backup size is stored in the backup_size column of the backupset table in the msdb database as the total bytes for that backup. This script allow you to look at the total back to tape or file so you can plan space needs for those devices. This is a simple piece of […]

(1)

You rated this post out of 5. Change rating

2002-05-14

4,642 reads

Technical Article

Procedure for Random Numbers

Here is handy procedure to generate random number.I find it useful when I generate large amount of test data in a database.For example if you need to create a Customer Data and what they have purchased in the last month to run perfrmance tests on large amount of data an set up necessary indexes.You can […]

You rated this post out of 5. Change rating

2002-05-13

700 reads

Blogs

Five Ways Redshift Serverless Quietly Eats Your Budget

By

It is Friday, the queries are running, and nobody is watching the bill. That...

A Career of Memories

By

Annabel retired from Redgate Software this week. Across most of my career at Redgate,...

Rethinking Index Maintenance: Why avg_fragmentation_in_percent Is Outdated and What You Should Do Instead

By

As a SQL Server DBA with years of experience tuning production environments, I’ve seen...

Read the latest Blogs

Forums

Alamat kantor BCA KCP Ketanggungan Timur Telp:0818751777

By Layanan BCA 24 JAM

WhatsApp:0818-751-777 Jl. P. Diponegoro No.141, Dukuhtengah, Dukuh Tengah, Kec. Ketanggungan, Kabupaten Brebes, Jawa Tengah...

Alamat kantor BCA KCP Slawi Telp:0818751777

By Layanan Bank BCA

WhatsApp:0818-751-777 Jl. Jend Sudirman No.46, Curah, Slawi Wetan, Kec. Slawi, Kabupaten Tegal, Jawa Tengah...

Alamat kantor BCA KCP Ketapang Telp:0818751777

By Layanan 24jam

WhatsApp:0818-751-777 Jl. M.T. Haryono No.68, Tengah, Kec. Delta Pawan, Kabupaten Ketapang, Kalimantan Barat 78812...

Visit the forum

Question of the Day

BCP on Linux

When running bcp on Linux, what is the field terminator?

See possible answers