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

Blogs

5 Advanced Online SQL DBA Training Courses to Learn in 2024 and Beyond

By

Buckle up, database wranglers! Nowadays, SQL DBAs hold the keys to a company's most...

Dynamically Unpivot columns in SQL

By

Picture this, your data ingestion team has created a table that has the sales...

Friday Basics: RPO and RTO

By

I did a post last month titled RTO and RPO are myths unless you've...

Read the latest Blogs

Forums

SQL Server Encrypt data into a file, send it and then decrypt

By GBeezy

First off, my apologies for what could potentially be a bad title! I am...

Table partitioning best practice

By JasonO

I've inherited a couple of rather large databases from my ex-colleague when I join...

Identifying Customer Buying Pattern in Power BI - Part 2

By Farooq Aziz

Comments posted to this topic are about the item Identifying Customer Buying Pattern in...

Visit the forum

Question of the Day

Finding Marks

I have marked a few transactions in my code. How can I find out which marks were stored in a transaction log?

See possible answers