Types of Functions

In this section:

You can access any of the following types of functions:

TIBCO WebFOCUS-Specific Functions

Most supplied functions are available in both WebFOCUS and FOCUS. However, some functions are available only in WebFOCUS. They are:

For details on these functions, see the individual topics.

Simplified Analytic Functions

The following functions perform calculations based on multiple rows in the internal matrix. For details, see Simplified Analytic Functions.

FORECAST_MOVAVE

Calculates a simple moving average column.

FORECAST_EXPAVE

Calculates a single exponential smoothing column.

FORECAST_DOUBLEXP

Calculates a double exponential smoothing column.

FORECAST_SEASONAL

Calculates a triple exponential smoothing column.

FORECAST_LINEAR

Calculates a linear regression column.

PARTITION_AGGR

Creates rolling calculations.

PARTITION_REF

Retrieves prior or subsequent fields.

INCREASE

Calculates the difference between a value in the current row and a prior row within a partition.

PCT_INCREASE

Calculates the percent difference between a value in the current row and a prior row within a partition.

PREVIOUS

Retrieves a prior value within a partition.

RUNNING_AVE

Calculate the average over a group of rows within a partition.

RUNNING_MIN

Calculate the minimum over a group of rows within a partition.

RUNNING_MAX

Calculate the maximum over a group of rows within a partition.

RUNNING_SUM

Calculate the sum over a group of rows within a partition.

Simplified Character Functions

The following functions manipulate alphanumeric fields or character strings and have simplified parameter lists. For details, see Simplified Character Functions.

CHAR_LENGTH

Returns the length, in characters, of a string.

Available Languages: reporting

DIGITS

Converts a number to a character string of the specified length.

Available Languages: reporting

GET_TOKEN

Extracts a token (substring) based on a token number and a string listing acceptable delimiter characters.

Available Languages: reporting

INITCAP

Capitalizes the first letter of every word in a string and makes all other letters lowercase, where a word starts at the beginning of the string, after a blank space, or after a special character.

Available Languages: reporting

LAST_NONBLANK

retrieves the last field value that is neither blank nor missing. If all previous values are either blank or missing, returns a missing value.

LOWER

Translates a string to lowercase.

Available Languages: reporting

LPAD

Left-pads a string with a given character.

Available Languages: reporting

LTRIM

Removes all blanks from the left end of a string.

Available Languages: reporting

PATTERNS

Returns a pattern that represents the structure of the source string.

Available Languages: reporting

POSITION

Returns the first position (in characters) of a substring in a source string.

Available Languages: reporting

REGEX

Matches a string to a regular expression and returns true (1) or false (0).

RPAD

Right-pads a string with a given character.

Available Languages: reporting

RTRIM

Removes all blanks from the right end of a string.

Available Languages: reporting

SUBSTRING

Extracts a substring from a source string.

Available Languages: reporting

TOKEN

Extracts a token (substring) based on a token number and a delimiter string.

Available Languages: reporting

TRIM_

Removes all occurrences of a single character from either the beginning or end of a string, or both.

Available Languages: reporting

UPPER

Translates a string to uppercase.

Available Languages: reporting

Character Functions

The following functions manipulate alphanumeric fields or character strings. For details, see Character Functions.

ARGLEN

Measures the length of a character string within a field, excluding trailing blanks.

Available Languages: reporting, Maintain

ASIS

Distinguishes between a blank and a zero in Dialogue Manager.

Available Languages: reporting

BITSON

Evaluates an individual bit within a character string to determine whether it is on or off.

Available Languages: reporting, Maintain

BITVAL

Evaluates a string of bits within a character string and returns its value.

Available Languages: reporting, Maintain

BYTVAL

Translates a character to its corresponding ASCII or EBCDIC decimal value.

Available Languages: reporting, Maintain

CHKFMT

Checks a character string for incorrect characters or character types.

Available Languages: reporting, Maintain

CTRAN

Translates a character within a character string to another character based on its decimal value.

Available Languages: reporting, Maintain

CTRFLD

Centers a character string within a field.

Available Languages: reporting, Maintain

EDIT

Extracts characters from or adds characters to a character string.

Available Languages: reporting

GETTOK

Divides a character string into substrings, called tokens, where a specific character, called a delimiter, occurs in the string.

Available Languages: reporting, Maintain

LCWORD

Converts the letters in a character string to mixed case.

Available Languages: reporting, Maintain

LCWORD2

Converts the letters in a character string to mixed case.

Available Languages: reporting, Maintain

LCWORD3

Converts the letters in a character string to mixed case.

Available Languages: reporting, Maintain

LJUST

Left-justifies a character string within a field.

Available Languages: reporting

LOCASE

Converts alphanumeric text to lowercase.

Available Languages: reporting, Maintain

OVRLAY

Overlays a base character string with a substring.

Available Languages: reporting

PARAG

Divides a line of text into smaller lines by marking them with a delimiter.

Available Languages: reporting, Maintain

POSIT

Finds the starting position of a substring within a larger string.

Available Languages: reporting

REVERSE

Reverses the characters in a character string.

Available Languages: reporting, Maintain

RJUST

Right-justifies a character string.

Available Languages: reporting

SOUNDEX

Searches for a character string phonetically without regard to spelling.

Available Languages: reporting, Maintain

SPELLNM

Takes an alphanumeric string or a numeric value with two decimal places and spells it out with dollars and cents.

Available Languages: reporting, Maintain

SQUEEZ

Reduces multiple contiguous spaces within a character string to a single space.

Available Languages: reporting, Maintain

STRIP

Removes all occurrences of a specific character from a string.

Available Languages: reporting, Maintain

STRREP

Replaces all occurrences of a specific character string.

Available Languages: reporting, Maintain

SUBSTR

Extracts a substring based on where it begins and its length in the parent string.

Available Languages: reporting

TRIM

Removes leading and/or trailing occurrences of a pattern within a character string.

Available Languages: reporting

UPCASE

Converts a character string to uppercase.

Available Languages: reporting

Variable Length Character Functions

The following functions manipulate variable length alphanumeric fields or character strings. For details, see Variable Length Character Functions.

LENV

Returns the actual length of an AnV field or the size of an An field.

Available Languages: reporting

LOCASV

Converts alphanumeric text to lowercase in an AnV field.

Available Languages: reporting

POSITV

Finds the starting position of a substring in an AnV field.

Available Languages: reporting

SUBSTV

Extracts a substring based on where it begins and its length in the parent string in an AnV field.

Available Languages: reporting

TRIMV

Removes leading and/or trailing occurrences of a pattern within a character string in an AnV field.

Available Languages: reporting

UPCASV

Converts a character string to uppercase in an AnV field.

Available Languages: reporting

Character Functions for DBCS Code Pages

The following functions manipulate character strings for DBCS code pages. For details, see Character Functions for DBCS Code Pages.

DCTRAN

Translates a single-byte or double-byte character to another character.

DEDIT

Extracts characters from or adds characters to a string.

DSTRIP

Removes a single-byte or double-byte character from a string.

DSUBSTR

Extracts a substring based on its length and position in the source string.

JPTRANS

Converts Japanese specific characters.

Maintain-specific Character Functions

The following functions manipulate alphanumeric fields or character strings. They are available only in the Maintain language. For details, see Maintain-specific Character Functions.

CHAR2INT

Translates an ASCII or EBCDIC character to the integer value it represents, depending on the operating system.

INT2CHAR

Translates an integer into the equivalent ASCII or EBCDIC character, depending on the operating system.

LCWORD and LCWORD2

Converts the letters in a character string to mixed case.

LENGTH

Measures the length of a character string, including trailing blanks.

LJUST

Left-justifies a character string within a field.

LOWER

Converts a character string to lowercase.

MASK

Extracts characters from or adds characters to a character string.

MNTGETTOK

Divides a character string into substrings, called tokens.

NLSCHR

Converts a character from the native English code page to the running code page.

OVRLAY

Overlays a base character string with a substring.

POSIT

Finds the starting position of a substring within a larger string.

RJUST

Right-justifies a character string.

SELECTS

Decodes a value from a stack.

STRAN

Substitutes a substring for another substring in a character string.

STRCMP

Compares two alphanumeric strings using the ASCII or EBCDIC collating sequence.

STRICMP

Compares two alphanumeric strings using the ASCII or EBCDIC collating sequence, but ignoring case differences.

STRNCMP

Compares a specified number of characters in two character strings starting at the beginning of the strings using the EBCDIC or ASCII collating sequence.

SUBSTR

Extracts a substring based on where it begins and its length in the parent string.

TRIM

Removes trailing occurrences of a pattern within a character string.

TRIMLEN

Determines the length of a character string excluding trailing spaces.

UPCASE

Converts a character string to uppercase.

Data Source and Decoding Functions

The following functions search for data source records, retrieve data source records or values, and assign values. For details, see Data Source and Decoding Functions.

COALESCE

Returns the value of the first non-missing argument.

Available Languages: reporting

DB_EXPR

Inserts an SQL expression into the SQL generated for a request against a relational data source.

Available Languages: reporting, MODIFY

DB_INFILE

Compares values in a source file to values in a target file, or if the source file is a relational data source, to values retrieved by a subquery.

Available Languages: reporting, MODIFY

CHECKMD5

Computes an MD5 hash check value of its input parameter.

Available Languages: reporting

CHECKSUM

Computes hash sum of its input parameter.

Available Languages: reporting

DB_LOOKUP

Retrieves a data value from a lookup data source.

Available Languages: reporting, MODIFY

DECODE

Assigns values based on the coded value of an input field.

Available Languages: reporting, Maintain

FIND

Determines if an incoming data value is in an indexed FOCUS data source field.

Available Languages: reporting

LAST

Retrieves the preceding value for a field.

Available Languages: reporting

LOOKUP

Retrieves a data value from a cross-referenced FOCUS data source in a MODIFY request.

Available Languages: MODIFY, Maintain

NULLIF

Returns a missing value when its parameters have equal values.

Available Languages: reporting

Simplified Date and Date-Time Functions

The following functions manipulate date and date- time values. For details see Simplified Date and Date-Time Functions.

DT_CURRENT_DATE

Returns the current date.

DT_CURRENT_DATETIME

Returns the current date and time.

DT_CURRENT_TIME

Returns the current time.

DTADD

Returns a new date after adding the specified number of a supported component

Available Languages: reporting, Maintain

DTDIFF

Returns the number of given component boundaries between the two dates.

Available Languages: reporting, Maintain

DTIME

Extracts time components from a date-time value.

DTPART

Returns a component value in integer format.

Available Languages: reporting, Maintain

DTRUNC

Returns the first date within a period

Available Languages: reporting, Maintain

Date Functions

In this section:

The following functions manipulate dates. For details see Date Functions.

Standard Date Functions

DATEADD

Adds a unit to or subtracts a unit from a date format.

Available Languages: reporting, Maintain

DATECVT

Converts date formats.

Available Languages: reporting, Maintain

DATEDIF

Returns the difference between two dates in units.

Available Languages: reporting, Maintain

DATEMOV

Moves a date to a significant point on the calendar.

Available Languages: reporting, Maintain

DATETRAN

Formats dates in international formats.

Available Languages: reporting, Maintain

DPART

Extracts a component from a date field and returns it in numeric format.

Available Languages: reporting, Maintain

FIYR

Returns the financial year, also known as the fiscal year, corresponding to a given calendar date based on the financial year starting date and the financial year numbering convention.

Available Languages: reporting, Maintain

FIQTR

Returns the financial quarter corresponding to a given calendar date based on the financial year starting date and the financial year numbering convention.

Available Languages: reporting, Maintain

FIYYQ

Returns a financial date containing both the financial year and quarter that corresponds to a given calendar date.

Available Languages: reporting, Maintain

HMASK

Extracts components from a date-time value and moves them to a target date-time field with all other components of the target field preserved.

Available Languages: reporting, Maintain

TODAY

Retrieves the current date from the system.

Available Languages: reporting, Maintain

Legacy Date Functions

AYM

Adds or subtracts months from dates that are in year-month format.

Available Languages: reporting, Maintain

AYMD

Adds or subtracts days from dates that are in year-month-day format.

Available Languages: reporting, Maintain

CHGDAT

Rearranges the year, month, and day portions of alphanumeric dates, and converts dates between long and short date formats.

Available Languages: reporting, Maintain

DA

Convert dates to the corresponding number of days elapsed since December 31, 1899.

DADMY converts dates in day-month-year format.

DADYM converts dates in day-year-month format.

DAMDY converts dates in month-day-year format.

DAMYD converts dates in month-year-day format.

DAYDM converts dates in year-day-month format.

DAYMD converts dates in year-month-day format.

Available Languages: reporting, Maintain

DMY, MDY, and YMD

Calculate the difference between two dates.

Available Languages: reporting, Maintain

DOWK and DOWKL

Find the day of the week that corresponds to a date.

Available Languages: reporting, Maintain

DT

Converts the number of days elapsed since December 31, 1899 to the corresponding date.

DTDMY converts numbers to day-month-year dates.

DTDYM converts numbers to day-year-month dates.

DTMDY converts numbers to month-day-year dates.

DTMYD converts numbers to month-year-day dates.

DTYDM converts numbers to year-day-month dates.

DTYMD converts numbers to year-month-day dates.

Available Languages: reporting, Maintain

GREGDT

Converts dates in Julian format to year-month-day format.

Available Languages: reporting, Maintain

JULDAT

Converts dates from year-month-day format to Julian (year-day format).

Available Languages: reporting, Maintain

YM

Calculates the number of months that elapse between two dates. The dates must be in year-month format.

Available Languages: reporting, Maintain

Date-Time Functions

The following functions manipulate date-time values. For details see Date-Time Functions.

HADD

Increments a date-time field by a given number of units.

Available Languages: reporting, Maintain

HCNVRT

Converts a date-time field to a character string.

Available Languages: reporting, Maintain

HDATE

Extracts the date portion of a date-time field, converts it to a date format, and returns the result in the format YYMD.

Available Languages: reporting, Maintain

HDIFF

Calculates the number of units between two date-time values.

Available Languages: reporting, Maintain

HDTTM

Converts a date field to a date-time field. The time portion is set to midnight.

Available Languages: reporting, Maintain

HEXTR

Extracts components from a date-time value and moves them to a target date-time field with all other components set to zero.

Available Languages: reporting, Maintain

HGETC

Stores the current date and time in a date-time field.

Available Languages: reporting, Maintain

HMASK

Extracts components from a date-time value and moves them to a target date-time field with all other components of the target field preserved.

Available Languages: reporting, Maintain

HHMMSS

Retrieves the current time from the system.

Available Languages: reporting

HINPUT

Converts an alphanumeric string to a date-time value.

Available Languages: reporting, Maintain

HMIDNT

Changes the time portion of a date-time field to midnight (all zeros).

Available Languages: reporting, Maintain

HNAME

Extracts a specified component from a date-time field and returns it in alphanumeric format.

Available Languages: reporting, Maintain

HPART

Extracts a specified component from a date-time field and returns it in numeric format.

Available Languages: reporting, Maintain

HSETPT

Inserts the numeric value of a specified component into a date-time field.

Available Languages: reporting, Maintain

HTIME

Converts the time portion of a date-time field to the number of milliseconds or microseconds.

Available Languages: reporting, Maintain

HTMTOTS/TIMETOTS

Converts a time to a timestamp.

Available Languages: reporting, Maintain

Maintain-specific Date and Time Functions

In this section:

The following functions manipulate dates and times. They are available only in the Maintain language. For details, see Maintain-specific Date and Time Functions.

Maintain-specific Standard Date and Time Functions

HHMMSS

Retrieves the current time from the system.

Initial_HHMMSS

Retrieves the time that the Maintain module was started.

Initial_TODAY

Retrieves the date that the Maintain module was started.

TODAY

Retrieves the current date from the system.

TODAY2

Retrieves the current date from the system.

Maintain-specific Legacy Date Functions

ADD

Adds a given number of days to a date.

DAY

Extracts the day of the month from a date.

JULIAN

Determines the number of days that have elapsed so far in the year up to a given date.

MONTH

Extracts the month from a date.

QUARTER

Determines the quarter of the year in which a date resides.

SETMDY

Sets a value to a date.

SUB

Subtracts a given number of days from a date.

WEEKDAY

Determines the day of the week for a date.

YEAR

Extracts the year from a date.

Simplified Conversion Functions

The following functions convert fields from one format to another, using streamlined parameter lists. For details, see Simplified Conversion Functions.

CHAR

Returns a character based on a numeric code.

COMPACTFORMAT

Converts a numeric value to an alphanumeric value that represents the number in an abbreviated format, using the characters K, M, B, and T to represent the abbreviation.

Available Languages: reporting

CTRLCHAR

Returns a non-printable control character.

FPRINT

Converts a numeric, date, or date-time value to a character string.

HEXTYPE

Returns the hexadecimal view of an input value.

PHONETIC

Returns a phonetic key.

Format Conversion Functions

The following functions convert fields from one format to another. For details, see Format Conversion Functions.

ATODBL

Converts a number in alphanumeric format to double-precision format.

Available Languages: reporting, Maintain

EDIT

Converts an alphanumeric field that contains numeric characters to numeric format or converts a numeric field to alphanumeric format.

Available Languages: reporting

FPRINT

Converts a field to alphanumeric format.

Available Languages: reporting

FTOA

Converts a number in a numeric format to alphanumeric format.

Available Languages: reporting, Maintain

HEXBYT

Obtains the ASCII or EBCDIC character equivalent of a decimal integer value.

Available Languages: reporting, Maintain

ITONUM

Converts a large binary integer in a non-FOCUS data source to double-precision format.

Available Languages: reporting, Maintain

ITOPACK

Converts a large binary integer in a non-FOCUS data source to packed-decimal format.

Available Languages: reporting, Maintain

ITOZ

Converts a number in numeric format to zoned format.

Available Languages: reporting, Maintain

PCKOUT

Writes a packed number of variable length to an extract file.

Available Languages: reporting, Maintain

PTOA

Converts a packed decimal number from numeric format to alphanumeric format.

Available Languages: reporting, Maintain

TSTOPACK

Converts a Microsoft SQL Server or Sybase TIMESTAMP column (which contains an incremented counter) to packed decimal.

Available Languages: reporting

UFMT

Converts characters in alphanumeric field values to hexadecimal representation.

Available Languages: reporting, Maintain

XTPACK

Stores a packed number with up to 31 significant digits in an alphanumeric field, retaining decimal data.

Maintain-specific Light Update Support Functions

The following functions retrieve WebFOCUS variable or parameter data implicitly from within a Maintain procedure. These functions are available only in Maintain Data. For details, see Maintain-specific Light Update Support Functions.

IWC.GetAppCGIValue

Imports the value of a WebFOCUS parameter or variable into a Maintain Data variable.

IWC.FindAppCGIValue

Retrieves WebFOCUS parameter or variable values.

Simplified Numeric Functions

The following functions perform calculations on numeric constants or fields, using streamlined parameter lists. For details, see Simplified Numeric Functions.

CEILING

Returns the smallest integer value greater than or equal to a value.

EXPONENT

Raises e to a power.

FLOOR

Returns the largest integer value less than or equal to a value.

MOD

Calculates the remainder from a division.

POWER

Raises a value to a power.

Numeric Functions

The following functions perform calculations on numeric constants or fields. For details, see Numeric Functions.

ABS

Returns the absolute value of a number.

Available Languages: reporting, Maintain

ASIS

Distinguishes between a blank and a zero in Dialogue Manager.

Available Languages: reporting

BAR

Produces a horizontal bar chart.

Available Languages: reporting, Maintain

CHKPCK

Validates the data in a field described as packed format.

Available Languages: reporting, Maintain

DMOD, FMOD, and IMOD

Calculate the remainder from a division.

Available Languages: reporting, Maintain

EXP

Raises the number "e" to a specified power.

Available Languages: reporting, Maintain

EXPN

Is an operator that evaluates a number expressed in scientific notation. For information, see Using Expressions in the Creating Reports With TIBCO WebFOCUS® Language manual.

FMLINFO

Returns the FOR value associated with each row in an FML report.

Available Languages: reporting

FMLLIST

Returns a string containing the complete tag list for each row in an FML request.

Available Languages: reporting

FMLFOR

Retrieves the tag value associated with each row in an FML request.

Available Languages: reporting

FMLCAP

Returns the caption value for each row in an FML hierarchy request.

Available Languages: reporting

INT

Returns the integer component of a number.

Available Languages: reporting, Maintain

LOG

Returns the natural logarithm of a number.

Available Languages: reporting, Maintain

MAX and MIN

Return the maximum or minimum value, respectively, from a list of values.

Available Languages: reporting, Maintain

MIRR

Calculates the modified internal rate of return for a series of periodic cash flows.

Available Languages: reporting

NORMSDST and NORMSINV

Perform calculations on a standard normal distribution curve.

Available Languages: reporting

PRDNOR and PRDUNI

Generate reproducible random numbers.

Available Languages: reporting, Maintain

RDNORM and RDUNIF

Generate random numbers.

Available Languages: reporting, Maintain

SQRT

Calculates the square root of a number.

Available Languages: reporting, Maintain

XIRR

Calculates the internal rate of return for a series of cash flows that can be periodic or non-periodic.

Available Languages: reporting

Maintain-specific Script Functions

Script functions integrate JavaScript and VBScripts into your Maintain Data applications and perform client-side execution without returning to the WebFOCUS® Reporting Server. These functions are available only in Maintain Data. For details, see Maintain-specific Script Functions.

IWCLink

Executes external procedures.

IWCSwitchToSecure and IWCSwitchToUnsecure

Turns the Secure Sockets layer on and off, respectively.

IWCTrigger

Returns control from the script to your application.

Simplified Statistical Functions

The following functions perform statistical functions. For details, see Simplified Statistical Functions.

CORRELATION

Calculates the degree of correlation between two independent sets of data.

KMEANS_CLUSTER

Partitions observations into clusters based on the nearest mean value.

MULTIREGRESS

Calculates a linear regression column based on multiple fields.

RSERVE

Runs an R script.

STDDEV

Calculates the standard deviation in a set of data values.

Simplified System Functions

The following functions call the operating system to obtain information about the operating environment or to use a system service, using streamlined parameter lists. For details, see Simplified System Functions.

EDAPRINT

Inserts a custom message in the EDAPRINT log file.

ENCRYPT
Encrypts a password.
GETENV
Retrieves the value of an environment variable.
PUTENV
Assigns a value to an environment variable.

System Functions

The following functions call the operating system to obtain information about the operating environment or to use a system service. For details, see System Functions.

CLSDDREC

Closes a file and frees the memory used to store information about open files.

Available Languages: reporting, Maintain

FEXERR

Retrieves a WebFOCUS error message.

Available Languages: reporting, Maintain

FINDMEM

Determines if a specific member of a partitioned data set (PDS) exists in batch processing.

Available Operating Systems: z/OS

Available Languages: reporting, Maintain

GETCOOKI

Retrieves the value of a browser cookie.

Available Languages: reporting, Maintain

GETHEADR

Retrieves the value of an HTTP Header variable.

Available Languages: reporting, Maintain

GETPDS

Determines if a specific member of a partitioned data set (PDS) exists, and if it does, returns the PDS name.

Available Operating Systems: z/OS

Available Languages: reporting, Maintain

GETUSER

Retrieves the ID of the connected user.

Available Languages: reporting, Maintain

MVSDYNAM

Transfers a FOCUS DYNAM command to the DYNAM command processor.

Available Operating Systems: z/OS

Available Languages: reporting, Maintain

PUTCOOKI

Submits a value to a browser cookie.

Available Languages: reporting, Maintain

PUTDDREC

Writes a character string as a record in a sequential file. Opens the file if it is closed.

Available Languages: reporting, Maintain

SLEEP

Suspends execution for a specified number of seconds.

Available Languages: reporting

SPAWN

Spawns a child process to execute system commands without terminating the current procedure. After the child process terminates, control returns to the parent process. This function is available only for WebFOCUS.

Available Operating Systems: UNIX

Available Languages: reporting

SYSTEM

Calls a DOS program, a DOS batch program, or a Windows application. This function is available only for WebFOCUS.

Available Operating Systems: Windows

Available Languages: reporting

SYSVAR

Retrieves the value of a z/OS system variable.

Available Operating Systems: z/OS

Available Languages: reporting

Simplified Geography Functions

These functions perform location-based calculations and retrieve geocoded points for various types of location data. For details, see Simplified Geography Functions.

GIS_DISTANCE

Calculates the distance between geography points.

GIS_DRIVE_ROUTE

Calculates the driving directions between geography points.

GIS_POINT

Builds a geometry point.

GIS_GEOCODE_ADDR

Geocodes a complete address.

GIS_GEOCODE_ADDR_CITY

Geocodes an address line, city, and state.

GIS_GEOCODE_ADDR_POSTAL

Geocodes an address line and postal code.

GIS_GEOMETRY

Builds a JSON geometry object.

GIS_IN_POLYGON

Determines whether a point is in a complex polygon.

GIS_LINE

Builds a JSON line.

GIS_REVERSE_COORDINATE

Given a longitude, latitude, and component name, returns the applicable geographic component.

GIS_SERVICE_AREA

Calculates a geometry area around a given point.

GIS_SERV_AREA_XY

Calculates a geometry area around a given coordinate.

Trigonometric Functions

The trigonometric functions provide trigonometric calculations, inverse trigonometric calculations, and angle conversion functions. For details, see Trigonometric Functions.

ACOS

Given the cosine of an angle in radians, ACOS (arccosine) returns an angle between 0 (zero) and pi radians.

ASIN

Given the sine of an angle in radians, ASIN (arcsine) returns an angle between -(pi/2) and pi/2 radians.

ATAN

Given the tangent of an angle in radians, ATAN (arctangent) returns an angle between -(pi/2) and pi/2 radians.

ATAN2

Given the coordinates of the tangent of an angle in radians, ATAN2 (arctangent2) returns an angle between -pi and pi radians.

COS

Given an angle in radians, COS calculates the cosine of the angle.

COT

Given an angle in radians, COT calculates the cotangent of the angle.

DEGREES

Converts an angle in radians to an angle in degrees.

PI

Returns the constant pi as a floating-point number.

RADIANS

Converts an angle in degrees to an angle in radians.

SIN

Given an angle in radians, SIN calculates the sine of the angle.

TAN

Given an angle in radians, TAN calculates the tangent of the angle.