Hello Guru's,
Table Name : EMPLOYEE
lv_emp_rowtype EMPLOYEE%ROWTYPE;
Fun1 ()
{
Set each variable of the lv_emp_rowtype with different Values depend on the Business logics
Call Function2 (lv_emp_rowtype)
}
Function2(lv_emp_rowtype EMPLOYEE%ROWTYPE)
{
lv_SQL := 'Insert into Employee_Interface_Table (Col1 , col2,...) Values (||lv_emp_rowtype.col1 , lv_emp_rowtype.co2 ....)';
EXECUTE IMMEDIATE lv_SQL ;
}
As above the Values are getting concatenated and pushed to interface Table for Processing.
Help Required :
Some of the character fields contains "single Quotes" . So required to search each column of the row type Variable something like below and replace
one single Quote with two single quotes , So during concatenation , it should create any issue.
Abc'def => Abc''def
example of Query required :
select * from lv_emp_rowtype_columns where column_data_type = 'VARCHAR2' and column_value like '%'%';
Replace '%'%' with '
Appreciate your help.
Thanks