Working with messy numeric data is one of those unavoidable realities in database development. Whether you’re importing data from CSV files, web APIs, or legacy systems, you’ll often encounter numeric values stored as strings with all sorts of unwanted characters mixed in. SQL Server’s conversion functions are pretty strict about what they’ll accept, so you need to clean up these strings before attempting any conversions.
string characters
How to Truncate Text with an Ellipsis in MariaDB
Sometimes you might find that the amount of text returned in a database column is too long. You might just want to return a short snippet of that text, followed by an ellipsis or three dots.
Fortunately, this is relatively easy to do in MariaDB.
How to Select a Certain Number of Characters from the Left or Right of a String in SQL Server
If you ever find yourself wanting only the first part of a string, or the last part of it, this article might help.
This article is specific to SQL Server, but the functionality is pretty common across most/all database management systems, not to mention most programming languages.
When working with SQL Server, you can use theT-SQL LEFT() and RIGHT() functions to return any given number of characters from the left or right of a string.