金額が一定額以下のコラムを作りたい。これを試すと、クエリが実行されます
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
ますか?
ありがとう