|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Hi All,
I created a SQL Object via Adapter Designer. It's used to insert a record into a table (for instance table1). I put the following sql statement into statement tab. INSERT INTO table1 (A,B) VALUES(?ValueA,?ValueB) I definded two 'User defined properties' ValueA - the value is string (for instance a) ValueB - the value is a string (for instance b) When I ran the sql object. I got "ORA-00917: missing comma" error. The runtime sql statement is "INSERT INTO table1(A,B) VALUES(a,b)". It's not correct. The "a" and "b" should be put into a pair of single quote. I tried _CONCAT("\'",a,"\'") and _CONCAT("\'",b,"\'") they dont work. I am wondering if someone encountered the same problem before. Thanks, iWay adapter manager SAP Adapter Web Services SAP BASIS, Java Core |
||
|
|
Platinum Member |
Hi,
If your table contains more fields than A and B, you may need to add them with null values in the insert statement. Majid. WebFocus 7.6.2 AND WebLogic server as web server sql2005 as database server |
|||
|
|
Member |
Maybe I didn't make myself cleary.
The problem is in the statement tab of SQL Object. The sql statment is "insert into table1(a,b) values(?ValueA,?ValueB)" During runtime, after it gets the values. The sql statement looks like: INSERT INTO table1 values(A,B). which is not a valid statement. it should be: INSERT INTO table1(a,b) values('A','B') I am wondering if anybody knows how to put the pair of single quotes in. thanks, Dennis iWay adapter manager SAP Adapter Web Services SAP BASIS, Java Core |
|||
|
|
Member |
Instead of:
INSERT INTO table1 (A, B) VALUES( ?ValueA, ?ValueB ) Code the statement as: INSERT INTO table1 (A, B) VALUES(‘?ValueA’, ‘?ValueB’) …making the single quotes part of the statement prior to parameter substitution. This approach should always work because the type (char vs. numeric.) is a known, fixed attribute of each target column. Obviously the single quotes should be omitted around parameters which do not need to be quoted at execution (those inserted into numeric columns). |
|||
|
|
Member |
Thanks. It works.
iWay adapter manager SAP Adapter Web Services SAP BASIS, Java Core |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

