我想制作我的金额小于某个值的列。当我尝试这个时,查询运行
select LOSA_APP.app_ref_no AS "App.Ref.No.",
LOSA_EXP_SUMM_Z.group_exp AS "Group Exposure Amount",
LOSA_EXP_SUMM_Z.group_exp - 25000 AS "Less than",
columns AS "some Name"
columns AS "some Name"
from
losa_app LOSA_APP
INNER JOIN
code_branch CODE_BRANCH
ON
LOSA_APP.attend_branch = CODE_BRANCH.branch_id
....
where
LOSA_APP.app_status in ('A','R')
and
....
or
(
'&&aplication' = 'Enhancement'
and
(
nvl(LOSA_APP.review_type, '-') IN ('Enhancement', 'Additional') and nvl(LOSA_APP.review_freq, '-') IN ('Enhancement', 'New')
)
);
但是,当我将行更改为 时LOSA_EXP_SUMM_Z.group_exp - 25000 AS "Less than"
,LOSA_EXP_SUMM_Z.group_exp < 25000 AS "Less than"
我得到的错误是
ORA-00923: FROM keyword not found where expected
00923. 00000 - "FROM keyword not found where expected"
*Cause:
*Action:
Error at Line: 3 Column: 34
第 3 行是LOSA_EXP_SUMM_Z.group_exp < 25000 AS "Less than"
. 为什么在我们使用时会运行它subtract sign
并在 的情况下给出错误relational operator
?
谢谢