Example: Using FORMAT as Part of Derived Expression - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

You can use FORMAT as part of a derived expression. To determine the percent increase if employee 10019 is given a $1000 raise:

SELECT (1000/salary)*100 (FORMAT 'zz9%')
   (TITLE 'Percent Incr')
   FROM employee
   WHERE empno = 10019 ;

Result:

Percent Incr
------------
          3%