In Oracle, the REGEXP_COUNT() function returns the number of times a pattern occurs in a source string.
How to Get the Short Day Name from a Date in MariaDB
In MariaDB, you can use the DATE_FORMAT() function to return various date parts from a date. One of the things you can return is the short day name. For example Tue or Wed (instead of Tuesday or Wednesday).
REGEXP_INSTR() Function in Oracle
In Oracle, the REGEXP_INSTR() function searches a string for a regular expression pattern. It returns an integer indicating the beginning or ending position of the matched substring (whichever one you specify).
It extends the functionality of the INSTR() function by allowing us to use regular expression patterns.
3 Ways to Convert a String to a Date in MongoDB
If you have a MongoDB collection with dates stored as strings, you can convert those into the Date BSON type if required.
Below are three ways to convert a string into a Date in MongoDB.
Return the Current Workstation Name that’s Connected to SQL Server (T-SQL)
Occasionally you might find yourself in the situation where you need to get the name of the current workstation that’s connected to SQL Server.
For example, maybe you have a stored procedure that inserts data, and you want to record the name of the workstation that inserted the data.
In such cases, you can use the HOST_NAME() function.
This is not to be confused with getting the server name.
RPAD() Function in Oracle
In Oracle, the RPAD() function allows you to pad the right part of a string with a certain character, to a specified number of characters.
The way it works is, you specify how long the resulting string should be. If the original string is shorter, the padding character fills in the remaining space.