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.

Read more

LPAD() Function in Oracle

In Oracle, the LPAD() function allows you to pad the left 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.

Read more

TRANSLATE() Function in Oracle

In Oracle, the TRANSLATE() function allows you to make several single-character, one-to-one substitutions in one operation.

It returns the string provided as a first argument after some characters specified in the second argument are translated into a destination set of characters specified in the third argument.

It’s similar to the REPLACE() function, except that the REPLACE() function replaces the whole string with another string (i.e. not character by character, like TRANSLATE() does).

Read more

SOUNDEX() Function in Oracle

In Oracle, the SOUNDEX() function returns a character string containing the phonetic representation of its argument. This is known as the Soundex string.

Soundex is a phonetic algorithm for indexing names by sound, as pronounced in English. If two words sound the same, they should have the same Soundex string. If two words sound similar, but not exactly the same, their Soundex string might look similar but not exactly the same.

The function accepts one argument: the string for which to return the Soundex string from.

Read more

SUBSTR() Function in Oracle

In Oracle, the SUBSTR() function returns a substring from a given string.

SUBSTR() requires at least two arguments; the string, and the position for which to extract the substring from. It also accepts an optional third argument that allows you to specify how long the substring should be.

SUBSTR() can also be thought of as a group of functions. There are five separate functions; SUBSTR(), SUBSTRB(), SUBSTRC(), SUBSTR2(), and SUBSTR4(). Each function calculates the length in a different way.

Read more

WIDTH_BUCKET() Function in Oracle

In Oracle, the WIDTH_BUCKET() function allows you to construct equiwidth histograms, in which the histogram range is divided into intervals that have identical size.

For a given expression, WIDTH_BUCKET() returns the bucket number into which the value of this expression would fall after being evaluated.

Read more