Technical Article

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,229 reads

Blogs

Daily Coping 26 Sep 2022

By

Today’s coping tip is to enjoy photos from a time with happy memories. On...

Daily Coping 23 Sep 2022

By

Today’s coping tip is to notice what you are feeling without any judgment. Today...

Snowflake – Where is the explain/execution plan?

By

Whatever your database background is you will have heard of an execution / explain...

Read the latest Blogs

Forums

Seggregating access within a database to users

By noobdba

For some folks that have gotten used to working in Oracle where a user...

Replication Error on identity Column : Transactional Replication

By Tom257

  I have manually deleted data from a subscriber replicated table, and broken replication....

Two fact tables related

By Maria

Hi all, I have a couple of modelling questions using several star schemas. There...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Using R apply

See possible answers