reading from right to left from string find first special characters in sql

-- For Oracle only

-- syntax 
SUBSTR(<main-string>,-<number-of-characters>)

-- example 
SUBSTR('Useless stuff',-9) -- OUTPUT: ess stuff

-- practical example
SELECT SUBSTR('Useless stuff',-9)
FROM DUAL;

4.11
9
Janexlane 95 points

                                    DECLARE @strvalue varchar(20) = 'SDADH/SDKDS/SD/UIO-123/WEA/456'
SELECT REVERSE(SUBSTRING(REVERSE(@strvalue),0,CHARINDEX ('/',REVERSE(@strvalue))))

4.11 (9 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
sql right from character take right characters sql sql right of character left character in sql last charter in string sql mssql right string substring from right side in sql Right function sql substring from right end of string in sql right()3,3 sql sql get first character of string how to get first three characters from a string in sql retrieve right 4 digits in sql mssql using right function gives int {fn RIGHT( sql LEFT SQL SERVER SQL QUERY sql first four characters select left sql sql query find location of string right to left sql right 7 characters sql cut string from right sql right of string sql first 10 characters of field take sql text to right sql at most 2 characters of string sql substring right of character last 10 values string in sql sal server right function return the right char in sql sql right command sql select right reading from right to left from string find first special characters in sql sql right() how to get dbms queries right sql rightstring check right side of string right command in sql right select sql select right function in sql how to get the last 3 letters in sql what right do i have in sql database how to get last three characters in a string in sql right function in sql roght sql right in sql server sql query substring from right right() in sql last character of string sql get the last 3 character in sql take right of string sql server take right of string to the right of sql sql server right of string HOW to check for the last characters in sql right sql server sql select last character of a string get last two characters in sql sql right string get 4 charecter from right sql sql substring right ms sql right function RIGHT tsql right substring sql server sql right function substring from right in sql sql query to print first 3 letters from right right sql statement substring right how to check 5 character in sql select last 4 didgits in sql reading digit from left to right in sql server right sql server function sql get last 2 characters from a string right functio in sql server right functio in sql sql server right function sql extract right string right sql rights in sql right in sql end string character in sql mssql get rght of column sql get last letter of string right in a select statement sql SQL RIGHT sql right characters
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source