on 08-02-2012 12:57 PM
Hi,
I am experiencing with an error " com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ',' "
I have checked and tested mapping with payload data , its executed successfully. Payload data structure is also fine.
Even I have unchecked "Key tags mandatory " option in JDBC communication channel but same error i am getting.
Could you plaese help me in this.
Thank you
Sathish.D
Hi,
Issue is resolved. The problem is with data only. I have sent correct data,then its working fine.
Thanks to all replies.
Sathish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sathish,
Could you share the target XML with the jdbc xml structure or the native SQL sentence?, probabbly some mistake can be there and it will easier to research the problem.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi vila,
Below is my payload data. ( Its Proxy to JDBC scenarion, Updating two tables to target sstem )
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MT_Receiver xmlns:ns0="http://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX">
<Statement1>
<SAP_Header action="INSERT">
<access>
<Invoice_Number>0220000009</Invoice_Number>
<Invoice_Date>2012/08/02</Invoice_Date>
<Insert_Date>2012/08/02</Insert_Date>
</access>
</SAP_Header>
</Statement1>
<Statement2>
<SAP_Detail action="INSERT">
<access>
<Billable_Amount>0.00</Billable_Amount>
<Insert_Date>2012/08/02</Insert_Date>
</access>
</SAP_Detail>
</Statement2>
</ns0:MT_Receiver>
Hi Santish,
In the Advanced tab page of your receiver JDBC channel, mark "Advanced Mode" checkbox and type a new parameter in the parameters table:
logSQLstatement = true
Thanks to this, the actual SQL statement executed in the database will be persisted in the audit log in RWB. Thanks to this, when you retest, you will be able to check the SQL statement and locate the error easily. See more details in SAP Note 801367 - XI 3.0 JDBC Adapter: Additional Parameters.
Regards,
Greg
OK, so since logging SQL statements is switched on, check the Communication Channel Monitor in RWB to see the actual SQL statement and locate the redundant comma (",") that the error says about. You can paste the statement here if you need help with that. No problem if you replace the real production data with some dummy values, just make sure not to destroy the syntax of the whole statement.
Regards,
Greg
Hi Greg,
here is my SQL statement from RWB.
Success : INSERT INTO SAP_Header (Invoice_Number, Invoice_Date, Insert_Date) VALUES ( 0220000009, 2012/07/02, 2012/08/02)
Error : Unable to execute statement for table or stored procedure. 'SAP_Header' (Structure 'Statement1') due to com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near ','.
Thank you
Sathish.D
>Success : INSERT INTO SAP_Header (Invoice_Number, Invoice_Date, Insert_Date) VALUES ( 0220000009, 2012/07/02, 2012/08/02)
This error normally occurs if there is discrepancy between number of column names and their respective values. I see your statement looks good. If you declare varchar type to any of the field then the query should use single quote for the respective value. Please check that.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.