Miscellaneous

Technical Article

Search for a value in a numeric variable list

  • Script

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

375 reads

Technical Article

Get total file size of backup for last full backup

  • Script

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 […]

5 (1)

You rated this post out of 5. Change rating

2002-05-14

4,568 reads

Technical Article

Procedure for Random Numbers

  • Script

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

648 reads

Technical Article

Parse a delimited string, return n-th value

  • Script

This UDF will parse a string delimited by the character you specify and return the value in the n-th position you requested.Example:select dbo.fn_parse('this string', ' ', 1) --> 'this'select dbo.fn_parse('this string', ' ', 2) --> 'string'select dbo.fn_parse('this string', ' ', 3) --> NULLselect dbo.fn_parse('this  string', ' ', 2) --> ''

1 (1)

You rated this post out of 5. Change rating

2002-05-10

483 reads

Blogs

How to Run Databases on Kubernetes: An 8-Step Guide

By

In this step-by-step tutorial, learn how to run MySQL, PostgreSQL, MongoDB, and other stateful...

Episode 11 of Simple Talks: Oracle

By

The 11th episode is now live, recorded a few weeks ago at the PASS...

A New Word: Mornden

By

mornden – n. the self-container pajama universe shared by two people on a long...

Read the latest Blogs

Forums

What is the best index strategy for a table that gets truncated?

By water490

Hi everyone My SSIS package does a bulk insert of csv files into a...

Blob Storage automated downloads

By Brandie Tarvin

Dipping my toes into the waters of Azure and of course before I get...

Announcing SQL Server 2025

By Press Release

Comments posted to this topic are about the item Announcing SQL Server 2025

Visit the forum

Question of the Day

Running Steve's Code

Can you run this code in any of your SQL Server 2019 databases without error?

CREATE OR ALTER PROCEDURE [dbo].[StevesAmazingProc]
AS
    
        SELECT Consumer_ID ,
               Trend_Category ,
               Bit_Trace
        FROM    NewWorldDB.dbo.MarketTrend;
    
GO

See possible answers