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

991 reads

Blogs

Azure SQL Database – Contained user Model

By

I always follow a contained user model when setting up users within my Azure...

Logging Messages with Raiserror – #SQLNewBlogger

By

Another post for me that is simple and hopefully serves as an example for...

Daily Coping 8 Mar 2021

By

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

Read the latest Blogs

Forums

Wait for query to finish before returning results

By oRBIT

When I do "select * from ... " from a large table, the result...

Reading a Specific File from an S3 bucket Using Python

By prashant239

Comments posted to this topic are about the item Reading a Specific File from...

Distributed SQL Databases

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Distributed SQL Databases

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers