LSTR() and RSTR(): Enhanced LEFT() and RIGHT()

Quite often I need to cut off the first (or last) few characters of a string. To do just that I created two functions LSTR() and RSTR().Syntax: LSTR( @stringtocut, @length )Note: @stringtocut is trimmed in the functionWhen @length is equal or larger than zero, this function performs the same as LEFT( LTRIM(RTRIM(@stringtocut)), @length ).When @length […]

1.67 (3)

2007-09-13

892 reads

Blogs

Daily Coping 4 Jun 2020

By

I’ve started to add a daily coping tip to the SQLServerCentral newsletter and to...

SQL Homework – June 2020 – DML Triggers

By

Triggers. Blech. Triggers are a really really cool feature of SQL Server, that are...

Backup your SQL instances configurations to GIT with dbatools – Part 2 – Add parallelism

By

We have seen how we can export and save the results to a folder...

Read the latest Blogs

Forums

How it secure from the Cash app hacked?

By oliviajmaes123

You have to know a few rules that you can use to secure your...

Getting error when delete the able donot have data

By asrinu13

Hi I have one doubt in ssis I want delete the data in the...

Database Extended Properties

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Database Extended Properties

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers