this question has answer here:
as see below select statement. not in stored procedure, added variables start_dt , end_dt use more dynamically. following error:
ora-06550: line 8, column 1: pls-00428: clause expected in select statement 06550. 00000 - "line %s, column %s:\n%s"
i looked on , of issues see have stored procedures apologize if duplicate. new pl/sql have used sql server on 7 years, imagine grammatical thing. below code
declare start_dt date; end_dt date; begin start_dt := to_date('2015-06-01'); end_dt := to_date('2015-06-30'); select trunc(txns.txn_gl_post_dt) dated, acc.acc_nbr acct, acc.acc_poo_pool pool, txns.txn_amt chgoff_amt accounts acc join txns txns on txns.txn_aad_id = acc.acc_aad_id , txns.txn_tcd_code = 'adv_chgoff' acc.acc_status_cd in ('chgoff','active') , trunc(txns.txn_gl_post_dt) between start_dt , end_dt order 1; end; i suspect how handling variables, thoughts?
a pl/sql block cannot run query. values need inserted somewhere -- table, variables, sort of encoding string.
hence, cannot readily want.
Comments
Post a Comment