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)

You rated this post out of 5. Change rating

2007-09-13

1,414 reads

Blogs

Removing a PowerShell Array Element–#SQLNewBlogger

By

I saw an article on this and realized I had no idea how to...

PostgreSQL Backup Failure

By

In this blog post I wrote a tip about fixing the PostgreSQL backup failure...

Dynamic Data Masking – SQL Server

By

Use Dynamic Data Masking to protect your data The post Dynamic Data Masking – SQL...

Read the latest Blogs

Forums

Small Transactional Table with Frequent Updates

By WoundedParrot

Hi All We have a 12 row on our platform that gets updated for...

Sporadic error during restore job

By webrunner

Hello experts, I see this error in a SQL Agent job. It happens during...

Average price calculation

By Puiu

Hello! I need to make a query that will calculate my average price for...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers