Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

TSQL Challenge 46 - Remove leading occurrences of the first character

By Jacob Sebastian,

This challenge is a slightly enhanced version of the 'remove leading zeros' problem. The 'remove leading zeros' problem involves removing all the occurrences of the leading zeroes from a number. What makes this challenge different is the requirement to remove the 'leading' occurrences of the first character in the string. So in this challenge, it is not zeroes that you are looking for, instead the first character in the string should be searched and all the leading occurrences should be removed.

TSQL Challenge 46 - Remove leading occurrences of the first character in a string

 
Total article views: 1696 | Views in the last 30 days: 1
 
Related Articles
BLOG

SQL BLOG: First Occurrence Of Character In a String

Scenario:  We need to find the first occurrence of character ie non numeric data in the string ...

FORUM

TSQL Challenge 46 - Remove leading occurrences of the first character

Comments posted to this topic are about the item [B]TSQL Challenge 46 - Remove leading occurrences o...

SCRIPT

Remove Pattern Matched Characters

Remove characters matched in a patindex pattern recursively.

FORUM

How to replace first occurrance of pipe delimeter

How to replace first occurrance of pipe delimeter

FORUM

Remove Character -- a comma from a number

Remove characters from numbers

Tags
 
Contribute