Using Lastindexof And Substring In Mssql
How do I get [Result] column from [Code] column using ms sql Id Code 200001 43791 200001 67036 200006 19.09.01.08683 200006 03.01.04.01.64230
Solution 1:
SELECT Id,
RIGHT(Code, CHARINDEX('.', REVERSE('.' + Code)) - 1) AS [Result],
Code
FROM YourTable
Post a Comment for "Using Lastindexof And Substring In Mssql"