SQL/MX 3.1 Reference Manual (H06.23+, J06.12+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Release 3.1 Reference Manual663850-001
9-52
Examples of DECODE
Examples of DECODE
In this example, the DECODE function returns a value of 3:
create table tab1( colA varchar(15));
insert into tab1 values('FAILED');
select DECODE(colA ,'PREPARE',1,
'OPERATION',2,
'FAILED',3,
'SUCCESS',4,
0)
from tab1;
(EXPR)
----------
3
DEGREES Function
The DEGREES function converts a numeric value expression expressed in radians to
the number of degrees.
DEGREES is an SQL/MX extension.
numeric-expression
is an SQL numeric value expression that specifies the value for the argument of
the DEGREES function. See Numeric Value Expressions on page 6-52.
Examples of DEGREES
This function returns the value 45 in degrees:
DEGREES (0.78540)
DEGREES (numeric-expression)