MySQL has a GROUP_CONCAT()
function that enables us to return columns from a query as a delimited list.
It returns a string result with the concatenated non-NULL
values from a group.
MySQL has a GROUP_CONCAT()
function that enables us to return columns from a query as a delimited list.
It returns a string result with the concatenated non-NULL
values from a group.
MariaDB has a GROUP_CONCAT()
function that enables us to return columns from a query as a delimited list.
In SQLite, we can use the PRINTF()
function or FORMAT()
function to format numbers with leading zeros.
MariaDB has an LPAD()
function that allows us to pad the left part of a string or number with our chosen character or series of characters.
We can use this function on numeric values in order to add leading zeros.
Continue readingAzure SQL Edge uses a limited version of the SQL Server Database Engine. One of the limitations of Azure SQL Edge, is that it doesn’t currently support CLR-dependent T-SQL functions, such as the FORMAT()
function.
This can be a problem when trying to format numbers.
However, there are often ways around such limitations. Here are examples of how we can pad numbers with leading and trailing zeros in SQL Edge.
Continue readingSome DBMSs have an LPAD()
and RPAD()
function which can be used to pad numbers with leading and trailing zeros.
SQL Server doesn’t have such a function. But that doesn’t prevent us from being able to pad numbers with leading/trailing zeros.
Continue readingThere are many ways to perform date arithmetic in MariaDB. This includes adding or subtracting a certain number of a given date part from a date or datetime value.
In this article, I present 8 ways to add an hour to a datetime value in MariaDB.
Continue readingSome RDBMSs provide an LPAD()
and RPAD()
function that enables us to left pad or right pad a string. Some functions also allow us to add leading or trailing zeros numbers.
Below are examples of applying SQL padding in some of the more popular RDBMSs.
Continue readingIn Azure SQL Edge, you can query the sys.databases
catalog view to see the recovery model for each database.
If you get an error that reads The statement BACKUP LOG is not allowed while the recovery model is SIMPLE when trying to back up a database in SQL Server or Azure SQL Edge, it’s because you’re trying to back up the transaction logs on a database that uses the simple recovery model.
To fix this, change the recovery model to either full or bulk logging.
Continue reading