Select As Formula command

SQL*XL
home

Syntax:
SELECT column AS FORMULA FROM ...

Description:
Selects data into an Excel Formula instead of as an excel value. This way data from the database can be regarded as formulae as well. You can use it to automatically wrap the data up in an Excel formula.

Example:
select ename, 'dollar('||to_char(sal)||chr(44)||'2)' as formula from emp;
This would create the salary field formatted as accounting using the Excel dollar function (note this formats the number according to your regional settings and not only as USD...).

See also: