When you write an expression, you can use the following arithmetic operators:
Multiplication and division are carried out to full precision (16–18 digits). Values are rounded:
Expression |
Value |
---|---|
20.0/3 |
6.666666666666667 |
3*(20.0/3) |
20 |
Truncate(20.0/3,4) |
6.6666 |
When you form an arithmetic expression that contains a NULL value, the expression becomes NULL. Thinking of NULL as undefined makes this easier to understand. For example, when a NULL column is multiplied by 5, the entire expression also evaluates to NULL. Use the IsNull function to explicitly check for the NULL value.
Boolean expressions that contain a NULL value evaluate to FALSE rather than to NULL. For more information, see “Relational operators in DataWindow expressions”.
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |