If you’re getting SQL Server error Msg 241 that reads Conversion failed when converting date and/or time from character string, it’s probably because you’re trying to convert a string to a date/time value, but that particular string can’t be converted to the date/time type specified.
how to
Find Values That Don’t Contain Numbers in SQLite
The following example returns all rows that don’t contain any numbers in SQLite.
By “number” I mean “numerical digit”. Numbers can also be represented by words and other symbols, but for the purpose of this article, we’re returning values that don’t contain any numerical digits.
How to Subtract a Day from a Date in MariaDB
MariaDB provides several ways to perform arithmetic on dates. This includes adding or subtracting a day (or many days) from a given date.
Here’s an example of subtracting a day from a date in MariaDB.
List All Functions in Oracle Database
Here are several ways to get a list of functions in Oracle Database.
Add the Ordinal Indicator to a Date in Oracle
In Oracle Database, we can use the TH format element to add the ordinal number suffix to the result of a TO_CHAR() operation when formatting dates.
For example, instead of outputting 10 Feb we could output 10th Feb. Or, instead of outputting 21 century, we can output 21st century. The same applies for spelled date components. For example, instead of Twenty One, we can output Twenty First.
3 Ways to Get the Collations Available in MariaDB
If you need to find the collations that are available in your MariaDB installation, check out the following three methods.
How to Detect if a Value Contains at Least One Numerical Digit in MySQL
If you need to return all rows that contain at least one numerical digit in MySQL, the following example might come in handy.
5 Ways to Fix the “Divide by zero error” in SQL Server (Msg 8134)
Here are five options for dealing with error Msg 8134 “Divide by zero error encountered” in SQL Server.
Find Out Which Currency Symbol your Session Uses in Oracle
In Oracle Database, the following NLS parameters can be used to determine how currencies are displayed for the current session:
NLS_CURRENCYspecifies the string to use as the local currency symbol for theLnumber format element.NLS_ISO_CURRENCYdetermines what to use for theCformat element.NLS_DUAL_CURRENCYspecifies what to use for theUformat element.
The default value for these is determined by the NLS_TERRITORY parameter.
The L, C, and U number format elements can be used in functions like TO_CHAR() to format a number as a currency.