LOG10: Calculating the Base 10 Logarithm

How to:

LOG10 returns the base-10 logarithm of a numeric expression.

Syntax: How to Calculate the Base 10 Logarithm

LOG10(num_exp)

where:

num_exp

Numeric

Is the numeric value for which to calculate the base 10 logarithm.

Example: Calculating the Base 10 Logarithm

The following request calculates the base 10 logarithm of current salaries.

TABLE FILE EMPLOYEE
PRINT CURR_SAL AND COMPUTE
LOG_CURR_SAL/D12.6 = LOG10(CURR_SAL);
BY LAST_NAME BY FIRST_NAME
WHERE DEPARTMENT EQ 'PRODUCTION';
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END

The output is shown in the following image.