In Oracle, the REGEXP_COUNT()
function returns the number of times a pattern occurs in a source string.
REGEXP_SUBSTR() Function in Oracle
In Oracle, the REGEXP_SUBSTR()
function returns a substring from a string, based on a regular expression pattern.
It extends the functionality of the SUBSTR()
function by allowing us to use regular expression patterns.
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_REPLACE() Function in Oracle
In Oracle, the REGEXP_REPLACE()
function replaces occurrences of the substring within a string that matches the given regular expression pattern.
It extends the functionality of the REPLACE()
function by allowing us to use regular expression patterns.
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.
Continue readingNLS_LOWER() Function in Oracle
In Oracle, the NLS_LOWER()
function returns its argument with all letters in lowercase.
It’s similar to the LOWER()
function, except that it accepts a second argument that allows you to specify the collation. The collation handles special linguistic requirements for case conversions.
NLS_UPPER() Function in Oracle
In Oracle, the NLS_UPPER()
function returns its argument with all letters in uppercase.
It’s similar to the UPPER()
function, except that it accepts a second argument that allows you to specify the collation. The collation handles special linguistic requirements for case conversions.
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.
Continue readingRPAD() 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.
Continue reading