Below statement use a mixture of bind variable, constant and Oracle keyword for insertion. ABC REVIEW
and N
are actual values to be inserted.
l_sql :='INSERT INTO EMP
(BUSINESS_DATE,GROUP_NAME, DELETED,UPDATE_DATE) VALUES
(:BIZ_DATE,ABC REVIEW,N,SYSDATE)';
Is this the correct way for parameter reference using dynamic SQL? Doesn't it require additional parenthesis?
Just esacpe the quote sign around actual string values:
l_sql :='INSERT INTO EMP
(BUSINESS_DATE,GROUP_NAME, DELETED,UPDATE_DATE) VALUES
(:BIZ_DATE,''ABC REVIEW'',''N'',SYSDATE)';