我有以下用 SQR 编写的代码:
select
business_unit &g8_iee_business_unit
ledger g8_iee_ledger
sum_posted_total_amt &yb_g8_iee_amount_selected
ft_yb_iee_RPT_NY &g8_iee_rpt_row_ny
currency_cd &g8_iee_currency_cd
From (
with a as (
Select DISTINCT account
From ps_gl_account_tbl
Where account [$col_g8_account]
)
SELECT /*+LEADING(a g8row g8func g8ybdata) PX_JOIN_FILTER(g8ybdata) swap_join_inputs(g8row) use_hash(g8row) swap_join_inputs(g8func) use_hash(g8func) swap_join_inputs(angel) use_hash(angel)*/
g8row.ft_yb_iee_rpt_ny, g8ybdata.business_unit, g8ybdata.ledger,
sum(g8ybdata.posted_total_amt) sum_posted_total_amt,
g8ybdata.currency_cd
from ps_ft_yba_rul8_row g8row
, ps_ledger g8ybdata
, a
where ([$criteria2])
and g8ybdata.ledger in ([$verledger])
and g8ybdata.account = a.account
and (g8ybdata.currency_cd = 'USD' or g8ybdata.currency_cd = ' ' )
and g8ybdata.fiscal_year = #year
and [$account_period_select]
and g8ybdata.product = g8row.product
and ( g8row.ft_yb_iee_rpt_ny > '18' AND g8row.ft_yb_iee_rpt_ny < '22' )
group by g8row.ft_yb_iee_rpt_ny, g8ybdata.business_unit, g8ybdata.ledger, g8ybdata.currency_cd
)
order by FT_YB_IEE_RPT_NY, business_unit, ledger, currency_cd;
似乎[$col_g8_account]
无法读取内联视图中的 ,因为它向我抛出了一个错误'invalid relational operator'
:
(SQR 5528)ORACLE OCIStmt 在游标 6 中执行错误 920:ORA-00920:无效的关系运算符 SQL:SELECT business_unit、ledger、sum_posted_total_amt、FT_YB_IEE_RPT_NY、ft_yb_rpt_col_char、CHARTFIELD2、currency_cd From(使用 as(从 ps_gl_account_tbl 中选择 DISTINCT 帐户) g8row.FT_YB_IEE_RPT_NY、g8func.ft_yb_rpt_col_char、g8func.CHARTFIELD2、g8ybdata.business_unit、g8ybdata.ledger、g8ybdata.currency_cd)
第 682 行错误:(SQR 3716) SQL 语句中的错误。
(SQR 5528)ORACLE OCIStmt 在游标 7 中执行错误 920:ORA-00920:无效的关系运算符 SQL:SELECT business_unit、ledger、sum_posted_total_amt、ft_yb_iee_RPT_NY、currency_cd From(从 ps_gl_account_tbl 中选择 DISTINCT 帐户,其中帐户组按 g8row.ft_yb_iee_rpt_ny, g8ybdata.business_unit、g8ybdata.ledger、g8ybdata.currency_cd)
第 803 行错误:(SQR 3716) SQL 语句中的错误。
在程序文件中发现错误。
PeopleSoft 的 SQR:程序中止。