Log Parser 2.2 - Function Reference

This reference can also be found in the LP 2.2 installation directory (typically: C:\Program Files (x86)\Log Parser 2.2)

ADD( Arg1 <any type>, Arg2 <any type> )
Calculates the sum of two values or concatenates two strings.

AVG( [ DISTINCT | ALL ] <field_expr> )
Returns the averaege of values.

BIT_AND( arg1 <INTEGER>, arg2 <INTEGER> ), BIT_NOT( arg <INTEGER>), BIT_OR( arg1 <INTEGER>, arg2 <INTEGER> ), BIT_SHL( arg1 <INTEGER>, arg2 <INTEGER> ), BIT_SHR( arg1 <INTEGER>, arg2 <INTEGER> ), BIT_XOR( arg1 <INTEGER>, arg2 <INTEGER> )
The BIT(xxx) functions calculate the specified bitwise operators of the argument values.

CASE <field_expression> WHEN <field_expression> THEN <field_expression> [ ... ] [ ELSE <field_expression> ] END
Compares the value of the specified field-expression with the values of the field-expressions in the WHEN statements, returning the value of the field-expression specified in a THEN statement when a match is found. If no match is found, the value of the ELSE statement field-expression is returned, or NULL if no ELSE statement is provided.

COALESCE( arg1 <any type>, arg2 <any type> [, ....] )
Returns the first non-NULL value in its arguments.

COMPUTER_NAME()
Returns the name of the local computer.

COUNT( [ DISTINCT | ALL ] * ) | ( [ DISTINCT | ALL ] <field_expr_list> )
Returns the count of items in a group.

DIV( dividend <INTEGER | REAL>, divisor <INTEGER | REAL> )
Calculates the quotient of two values.

EXP( argument <INTEGER | REAL> )
Calculates x raised to the power of the argument.

EXP10( argument <INTEGER | REAL> )
Calculates 10 raised to the power of the argument.

EXTRACT_EXTENSION( filepath <STRING> )
Returns the file extension portion of a path.

EXTRACT_FILENAME( filepath <STRING> )
Returns the filename portion of a path.

EXTRACT_PATH( filepath <STRING> )
Returns the directory path portion of a path.

EXTRACT_PREFIX( argument <STRING>, index <INTEGER>, separator <STRING> )
Returns the prefix of the specified argument up to the nth appearance of the specified separator. Negative values of the index argument are relative to the end of the string.

EXTRACT_SUFFIX( argument <STRING>, index <INTEGER>, separator <STRING> )
Returns the portion of the specified argument string enclosed within the nth appearance of the specified separator and the next. Negative values of the index argument are relative to the end of the string.

EXTRACT_TOKEN ( argument , index [ , separator=',' <STRING< ] )
Splits the string into substrings at each point where the separator occurs, and returns the substring with the specified index.

EXTRACT_VALUE( argument <STRING>, key <STRING> [ , separator <STRING> ] )
Returns the portion of the specified argument string enclosed within the nth appearance of the specified separator and the next. Negative values of the index argument are relative to the end of the string.

FLOOR( argument <REAL> )
Returns the largest integer less than or equal to the specified value.

GROUPING( <field_expr> )
Returns a value of 1 when the row is added by the ROLLUP operator of the GROUP BY clause, or 0 when the row is not the result of ROLLUP. GROUPING is used to distinguish the NULL values returned by ROLLUP from standard NULL values. The NULL returned as the result of a ROLLUP operation is a special use of NULL. It acts as a value placeholder in the result set and means "all".Type: aggregate

HASHMD5_FILE( filePath <STRING> )
Returns a string containing the MD5 hash of the content of a file.

HASHSEQ( value <STRING> )
Returns a sequential integer for each distinct value of the specified argument.

HEX_TO_ASC( hexString <STRING> )
Converts HEX to ASCII

HEX_TO_HEX16( hexString <STRING> [ , bigEndian <INTEGER> ] )
Converts HEX to 16BIT Words.

HEX_TO_HEX32( hexString <STRING> [ , bigEndian <INTEGER> ] )
Converts HEX to 32BIT Words.

HEX_TO_HEX8( hexString <STRING> )
Converts HEX to 8BIT Words.

HEX_TO_INT( hexString <STRING> )
Converts HEX to INT

HEX_TO_PRINT( hexString <STRING> )
Convertes HEX to printable ASCII characters

IN_ROW_NUMBER()
Returns the current input record number.

INDEX_OF( string <STRING>, searchStr <STRING> )
Returns the character position where the first occurrence of a string occurs.

INT_TO_IPV4( ipV4Address <INTEGER> )
Converts a 32-bit integer into the string version of an IPV4 address.

IPV4_TO_INT( ipV4Address <STRING> )
Converts the string version of an IP address to a 32-bit integer.

LAST_INDEX_OF( string <STRING>, searchStr <STRING> )
Returns the character position where the last occurrence of a string occurs.

LOG( argument <INTEGER | REAL> )
Calculates the Natural logarithm of the argument.

LOG10( argument <INTEGER | REAL> )
Calculates the base-10 logarithm of the argument.

LTRIM( string <STRING> )
Removes space characters from the beginning of a string.

MAX( [ DISTINCT | ALL ] <field_expr> )
Returns the maximum value among all the values.

MIN( [ DISTINCT | ALL ] <field_expr> )
Returns the minimum value among all the values.

MOD( dividend <INTEGER | REAL>, divisor <INTEGER | REAL> )
Calculates the remainder of the division of two numbers.

MUL( multiplicand <INTEGER | REAL>, multiplier <INTEGER | REAL> )
Calculates the product of two number values.

OUT_ROW_NUMBER()
Returns the current output record number.

PROPCOUNT( * ) [ ON ( <on_field_expr_list> ) ] | ( <field_expr_list> ) [ ON ( <on_field_expr_list> ) ]
Calculates the ratio of the number of records in the current group to the total number of records in the query or to the total number of records in a larger group containing the current group, returning a percentage value.

PROPSUM( <field_expr> ) [ ON ( <on_field_expr_list> ) ]
Exactly like the PROPCOUNT aggregate function, with the only difference being that PROPSUM returns the ratio of two SUM aggregate functions, rather than the ratio of two COUNT aggregate functions.

QNTFLOOR_TO_DIGIT( value <INTEGER>, digits <INTEGER> )
Truncates an integer to a specified number of digits, remaining digits to zero.

QNTROUND_TO_DIGIT( value <INTEGER>, digits <INTEGER> )
Rounds an integer to a specified number of digits, remaining digits to zero.

QUANTIZE( argument <INTEGER | REAL | TIMESTAMP>, quantization <INTEGER | REAL> )
Truncates a value to the nearest multiple of another value.

REPLACE_CHR( string <STRING>, searchCharacters <STRING>, replaceString <STRING> )
Replaces each occurrence of a character in a set of characters with a string.

REPLACE_IF_NOT_NULL( argument <any type>, replaceValue <any type> )
Returns the second argument when the first argument is not NULL..

REPLACE_STR( string <STRING>, searchString <STRING>, replaceString <STRING> )
Replaces each occurrence of a substring with a string.

RESOLVE_SID( sid <STRING> [ , computerName <STRING> ] )
Resolves a SID and returns its account name.

REVERSEDNS( ipAddress <STRING> )
Resolves an IP address to its DNS host name.

ROT13( string <STRING> )
Encodes or decodes a string using the ROT13 encrytption algorithm.

ROUND( argument <REAL> )
Returns the integer closest to the specified number of digits.

RTRIM( string <STRING> )
Removes whitespace characters from the end of a string.

SEQUENCE( [ startValue <INTEGER> ] )
Returns a unique sequential integer associated with the current input record number.

SQR( argument <INTEGER | REAL> )
Returns a sequential integer for each input record. The optional startValue argument specifies the initial value of the sequence.

SQRROOT( argument <INTEGER | REAL> )
Calculates the square root of the argument.

STRCAT( string1 <STRING>, string2 <STRING> )
Concatanates one string with another.

STRCNT( string <STRING>, token <STRING> )
Returns the number of occurrences of a substring in a string.

STRLEN( string <STRING> )
Returns the length of a string.

STRREPEAT( string <STRING>, count <INTEGER> )
Produces a string by repeating a substring ~n number of times.

STRREV( string <STRING> )
Reverses the characters in a string.

SUB( minuend <any type>, subtrahend <any type> )
Subtracts two values.

SUBSTR( string <STRING>, start <INTEGER> [ , length <INTEGER> ])
Returns a substring beginning at a specified location having a specified length.

SUM( [ DISTINCT | ALL ] <field_expr> )
Returns the SUM of all values or a distinct value.

SYSTEM_DATE()
Returns the current system date in Universal Time Coordinates(UTC).

SYSTEM_TIME()
Returns the current system time of the day in Universal Time Coordinates(UTC).

SYSTEM_TIMESTAMP()
Returns the current system date and time in Universal Time Coordinates (UTC) time.

SYSTEM_UTCOFFSET()Returns the current system timezone and daylight saving offset relative to UTC.

TO_DATE( timestamp <TIMESTAMP> )
Converts a timestamp into a date-only timestamp.

TO_HEX( argument )
Returns the hexadecimal version of an integer or string.

TO_INT( argument <any type> )
Converts REAL, TIMESTAMP or STRING to an integer.

TO_LOCALTIME( timestamp <TIMESTAMP> )
Converts a timestamp from UTC into local time.

TO_LOWERCASE( string <STRING> )
Returns a string as lowercase characters.

TO_REAL( argument <any type> )
Converts INT, TIMESTAMP or STRING to an REAL number.

TO_STRING( argument <INTEGER | REAL> ) | ( timestamp <TIMESTAMP>, format <STRING> )
Converts a value to a STRING.

TO_TIME( timestamp <TIMESTAMP> )
Converts a timestamp into a time-only part of a timestamp.

TO_TIMESTAMP( dateTime1 <TIMESTAMP>, dateTime2 <TIMESTAMP> ) | ( string <STRING>, format <STRING> ) ( seconds <INTEGER | REAL> )
Parses a string in timestamp format and returns a value of the TIMESTAMP data type.

TO_UPPERCASE( string <STRING> )
Converts a string to all uppercase characters.

TO_UTCTIME( timestamp <TIMESTAMP> )
Converts a timestamp from local time to UTC.

TRIM( string <STRING> )
Removes whitespace characters from the beginning and end of the specified string.

URLESCAPE( url <STRING> [ , codepage <INTEGER> ] )
Convert a string into a URL encoded string.

URLUNESCAPE( url <STRING> [ , codepage <INTEGER> ] )
Convert a URL encoded string into a plain string.

WIN32_ERROR_DESCRIPTION( win32ErrorCode <INTEGER> )
Returns the text version of any underlying Windows, Win32 error code