Decimal support in DataWindow expressions – PB Docs 126

Decimal support in DataWindow expressions

Description

PowerBuilder provides a variety of ways to work with decimal
values in DataWindow expressions.

Usage

The following arithmetic operators now return a decimal value
if both operands have a datatype of decimal:

Table 2-1: Columns in the Fin_code table

Operator

Meaning

Example

+

Addition

Subtotal + Tax

Subtraction

Price – Discount

*

Multiplication

Quantity*Price

/

Quantity*Price

Quantity*Price

If either operand is not a decimal, the returned value is
converted to a double datatype. The exponentiation operator (^)
returns a double

Relational operators that operate on numeric values, including =, >, <, <>, >=, and <=,
can take decimal operands. The precision of the decimal operand
is maintained in comparisons.

The following functions return a decimal datatype if their
arguments are decimals: Sum, CumulativeSum, Avg, Median, Count, First, Last, Max, Min, Large, Small, Var, VarP, Mod, Mode, Abs, Case, If.

The following functions return a decimal result instead of
a double: CrosstabAvgDec, CrosstabMaxDec, CrosstabMinDec,
and CrosstabSumDec.

The Dec function converts a constant string
to a decimal.

The Specify Retrieval Arguments dialog box includes the Decimal
and Decimal array types.

See also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x