Rules for Aliases in DBOPs that Contain Aggregate Functions

If your database operation includes a SQL statement that involves aggregate functions such as SUM, you must use aliases for any column names to which such aggregate functions refer.

Each alias must follow the rules for valid JavaScript identifiers:

For example, in the following SQL statement, dollarsum is an alias for the sum of the column named DOLLARS.

SELECT
sum(DOLLARS) dollarsum, CUSTOMERID FROM sales GROUP BY CUSTOMERID
ORDER BY CUSTOMERID

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com