on 08-16-2005 12:18 PM
Hi all,
I've developed an application in WebDynpro using SQLJ.This application accesses my MAXDB database.When I write a normal query in SQLJ for e.g
INSERT into TMP_EMPLOYEE(EMPID,EMPNAME,DEPT) values (:empid,:empname,:dept)
(empid,empname,dept are variables) there is no problem.
What I want to do is replace the table name by a variable which contains the tablename.I tried the following query
INSERT into :tablename (EMPID,EMPNAME,DEPT) values (:empid,:empname,:dept)
But it gave me syntax error
<b>SQLJ: SQL syntax error: the token "?" was not expected here</b>
Has anybody tried this?
SQLJ doesn't support dynamic sql statements. Please use OpenSQL/JDBC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.