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

209 reads

Technical Article

Port from Oracle's TRANSLATE Function

Here is a port from the Oracle's TRANSLATE function to T-SQL. It gets three arguments: a string to be searched, a string with a set of characters to be found and replaced, and another set of characters as the replacements. Example: SELECT dbo.TRANSLATE('ABCDE', 'BD', 'CE') It will return 'ACCEE'.

3 (2)

You rated this post out of 5. Change rating

2002-01-03

469 reads

Blogs

Attacking the Weakest Link

By

When I look at a system and think about its security model, the first...

Webinar – Microsoft Fabric for Dummies

By

On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about...

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

Read the latest Blogs

Forums

ghost backups processed 0 pages

By Snargables

I've got something I'm not aware of performing backups of my dbs at random...

Stored Procedures - passed string than variable length

By Arthur Kirchner

Dear all, I was just wondering: Can you change the default behaviour as illustrated...

Multi row tally query with max value

By ibbo14

Hello folks, I would be very grateful if someone could assist me with this...

Visit the forum

Question of the Day

The Backup File Extension

I run this command in SQL Server 2022. What is the extension of the backup file?

BACKUP DATABASE HerdofTwo TO DISK = 'HerdOfTwo_20240501'

See possible answers