|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
手头有段package脚本,在9i下运行无误,但是在8i下运行,出现PLS-00103问题,请问各位是否知道为什么会有这种差异?谢谢。
部分代码:
CURSOR get_fa001 ISSELECT ad_main.asset_number, ad_main.tag_number, cat.segment1 fa_main_cate, cat.segment2 fa_sub_cate, fakey.segment1 fa_key, ad_main.model_number model_name, REPLACE (ad_main.serial_number, '"', '') serial_number, ad_main.asset_type asset_type, TO_CHAR (rsv.date_placed_in_service, 'DD-MON-YYYY') date_placed_in_service, rsv.la_cost COST, rsv.deprn_reserve, rsv.ytd_deprn, rsv.la_cost - rsv.deprn_reserve nbv, iv_period period_name, fab.salvage_value, rsv.life deprn_life, cc.segment1, cc.segment2, cc.segment3, cc.segment4, cc.segment5, cc.segment6, loc.segment1 fa_plant, loc.segment2 fa_loc, loc.segment3 fa_area, REPLACE (ad_main.description, '"', '') description, NULL oracle_po, NULL invoice_number, NULL invoice_date, NULL supplier_name, ad_main.attribute4 external_po_no, ad_main.attribute3 seiban_no, ad_main.attribute2 sanction_no, ad_main.current_units unit, ad_main.attribute1 requestor, ad_main.attribute5 die_group_no, ad_main.asset_id asset_id, NULL payables_batch_name, ad_main.in_use_flag in_use_flag, TO_CHAR (fnd_date.canonical_to_date (ad_main.attribute9), 'DD-MON-YYYY' ) impairment_date, TO_CHAR (fnd_date.canonical_to_date (ad_main.attribute10), 'DD-MON-YYYY' ) ria_date, TO_CHAR (hist.units_assigned / ad_main.current_units) per_unit, 0 ap_distribution_line_number FROM fa_additions ad_main, fa_category_books cb, fa_categories cat, gl_code_combinations cc, fa_distribution_history hist, fa_asset_keywords fakey, fa_books_v fab, fa_locations loc, (SELECT ad.asset_id, cc.code_combination_id, date_placed_in_service, method_code method, rsv.life life, rsv.rate adj_rate, ds.bonus_rate bonus_rate, rsv.capacity prod, SUM (DECODE (transaction_type, 'B', NULL, COST)) la_cost, SUM (rsv.deprn_amount) deprn_amount, SUM (rsv.ytd_deprn) ytd_deprn, SUM (rsv.deprn_reserve) deprn_reserve, SUM (DECODE (transaction_type, 'B', NULL, NVL (PERCENT, 0) )) PERCENT FROM fa_reserve_ledger rsv, fa_additions ad, gl_code_combinations cc, fa_deprn_summary ds WHERE rsv.asset_id = ad.asset_id AND rsv.dh_ccid = cc.code_combination_id AND ds.period_counter(+) = rsv.period_counter AND ds.book_type_code(+) = iv_fa_book AND ds.asset_id(+) = rsv.asset_id AND rsv.date_effective BETWEEN (SELECT NVL(period_open_date,sysdate) FROM fa_deprn_periods WHERE book_type_code = iv_fa_book AND period_name = iv_period) AND (SELECT NVL (period_close_date, rsv.date_effective ) FROM fa_deprn_periods WHERE book_type_code = iv_fa_book AND period_name = iv_period) GROUP BY ad.asset_id, cc.code_combination_id, date_placed_in_service, method_code, rsv.life, rsv.rate, rsv.capacity, ds.bonus_rate) rsv WHERE ad_main.asset_id = rsv.asset_id AND cb.book_type_code = iv_fa_book AND cat.category_id = cb.category_id AND rsv.code_combination_id = hist.code_combination_id AND cc.code_combination_id = hist.code_combination_id AND rsv.asset_id = hist.asset_id AND ad_main.asset_key_ccid = fakey.code_combination_id AND fab.asset_id = ad_main.asset_id AND loc.location_id = hist.location_id 。。。。。。
报错信息:
LINE/COL ERROR-------- -----------------------------------------------------------------5909/39 PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + mod not null others <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string>
5913/48 PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
LINE/COL ERROR-------- ----------------------------------------------------------------- ( - + mod not null others <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string>
5956/17 PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + mod not null others <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg
LINE/COL ERROR-------- ----------------------------------------------------------------- count current exists max min prior sql stddev sum variance execute forall time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string>
5971/82 PLS-00103: Encountered the symbol "," when expecting one of the following: ; return returning and or
。。。[em11] |
|