code in jsp page

```
 CallableStatement cs ;
cs=conn.prepareCall("{call held1(?,?,?)}"); 
cs.setString(1,"'"+session.getAttribute("roll")+"'"); // sending session to procedure .reciving this in s variable
cs.setString(2, "1");// sending serial nos as string and wanna recieve in sno. variable
cs.setString(3, "Monday"); // sending table name as string and wanna recieve it in tab variable
cs.executeUpdate();

```

"'"+session.getAttribute("roll")+"'" want to recive this value in s argument
"1"

code in oracle database

procedure

```
create or replace procedure "HELD1"
(s  VARCHAR2,sno  VARCHAR2,tab  VARCHAR2)
is
l_col_name varchar2(30);
begin
execute immediate
'SELECT SUBJECTCODE into l_col_name FROM '||tab||' WHERE SERIALNUMBER ='''||sno||'''';

    execute immediate 
    'UPDATE dprofile SET '|| l_col_name || ' = ' || l_col_name || ' + 1 WHERE       Rollno = ''' ||s || '''';
end;

```

* s : Value of RollNo
* sno : Serial No. Passed as argument String
* tab : Name Of Table Passed as Argument to Procedure

Error Message:

> 
> java.sql.SQLException: ORA-00905: missing keyword ORA-06512: at
>  "ROHIT.HELD1", line 8 ORA-06512: at line 1
> 
> 
>