Hi All,
I am using a native dynamic SQL statement to insert records into a custom GT table in Procedure.
Oracle 17 version
v_sql:='insert into XXC_PO_DETAILS_GT
(po_num,
po_amount,
sum(total) over (parition by inv_id) po_total,
from(select po_num,
po_amount,
total,
inv_id
from tables...
)';
if p_create_date is NOT NULL
THEN
v_sql:=v_sql||' AND po.po_create_date>=''''l_date''''');
END IF;
.
.
.
EXECUTE IMMEDIATE v_sql;
While executing getting below error.
Unexpected error while generating data: ORA-00907: missing right parenthesis
ORA-00907: missing right parenthesis at Before trigger part before query formation