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

Blogs

T-SQL Tuesday #180: Good enough is perfect Roundup

By

This month, I prompted bloggers to discuss whether good enough is perfect. Thank you to all...

Using SQL Compare with Read-only Access

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Off to Live 360

By

I am off to Live 360 today, on my last trip of the year....

Read the latest Blogs

Forums

Video game Recap and previous rating: Utah Jazz take complicated gain previously

By Emanis

The Utah Jazz experienced arguably their utmost modern acquire of the year in excess...

Immediate Recap: Pounds 124, Clippers 117

By Emanis

No person would create the situation that a eye-catching video game of basketball was...

Charlotte faces Chicago upon 4-sport residence drop

By Emanis

Chicago Bulls vs. Charlotte HornetsCharlotte, North Carolina; Wednesday, 7:30 p.m. ESTBOTTOM LINE: Charlotte is...

Visit the forum

Question of the Day

A Strange Result

What does this code return in SSMS 20 from SQL Server 2019?

select '|' + CHAR(0)+'abc' + '|';

See possible answers