TRANSLATE is similar to the REPLACE function. It differs in that is allows you to make several character replacements in one pass. TRANSLATE returns a VARCHAR2 string that is arg1 with all instances of characters in the match argument replaced
LOCALTIMESTAMP – Oracle SQL Function
LOCALTIMESTAMP returns a TIMESTAMP value. You can specify an optional integer argument to specfiy the precision of the second field. Example: SELECT LOCALTIMESTAMP FROM DUAL; LOCALTIMESTAMP —————————- 13-SEP-05 03.02.49.407000 PM
Trunc – Oracle SQL Function
TRUNC returns the 1st argument truncated by the number of decimal places specified in the 2nd argument. The 2nd argument can be either be a positive integer to specify the right of the decimal point or a negative number to
Treat – Oracle SQL Function
TREAT allows you to change the declared type of the expr argument. This function comes in handy when you have a subtype that is more specific to your data and you want to convert the parent type to the more
MONTHS_BETWEEN – Oracle SQL Function
MONTHS_BETWEEN returns an integer specfiying the number of months between two dates. The result can be either positive or negative depending on which date is greater. Example: SELECT MONTHS_BETWEEN(10-JAN-2036′, ’10-JAN-2004′ ) AS RESULT FROM DUAL; RESULT ——————- 384
Ascii – Oracle SQL Function
ASCII returns the decimal representation of the character supplied in the 1st argument. If your database is set to ASCII, then this will be the ASCII code for the character. If your database is set to EBCDIC then it will
Trim – Oracle SQL Function
TRIM returns a VARCHAR2 string with either the leading, trailing, or both the leading and trailing characters char trimmed from source. TRIM([LEADING] [TRAILING] [BOTH] char FROM SOURCE) IF you specify TRAILING then the trailing characters that match char will be
NEW_TIME – Oracle SQL Function
NEW_TIME returns the date and time in timt zone ‘tz2’ based on the time zone ‘tz1’ and the date argument ‘the_date’. Syntax: NEW_TIME(the_date, tz1, tz2) You must set the NLS_DATE_FORMAT parameter to a 24-hour format before you execute the NEW_TIME
Chr – Oracle SQL Function
CHR returns the character specified by the code passed in the 1st argument. The returned character depends on the underlying code set that Oracle is using for character data. The argument must be a value that Oracle can implicitly convert
Upper – Oracle SQL Function
UPPER returns a VARCHAR2 string that contains all the characters of argument1 in uppercase. The argument1 can be a CHAR, VARCHAR2,NCHAR,NVARCHAR2,CLOB or NCLOB data type. Example: SELECT UPPER(‘oracle rocks’) as RESULT from DUAL; RESULT —————— ORACLE ROCKS