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

1,032 reads

Blogs

Azure SQL Managed Instance Versions

By

Just a really quick FYI for the readers. If you are using Managed Instances...

A summary of new features in Azure SQL Database

By

It has been some time since I last wrote about Azure SQL Database. Although...

Daily Coping 23 Jun 2021

By

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

Read the latest Blogs

Forums

about the concern about sp_updatestats

By 892717952

Do I still need to run sp_updatestats  if I execute DBCC DBREINDEX(tablename) for tables...

SQL Server 2019 Distributed Availability Groups

By DK

Hello.  I am looking into setting up a Distributed Availability Group between 2 availability...

Server Roles and Permissions

By Atat Rowcount

Hi guys Setting up a new SQL Server on Azure (Managed Instance).  I have...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers