on 07-28-2015 10:46 AM
HI
My scenario is from ECC to MS SQL. I am doing an INSERT in the table. When I run the scenario, I am getting this error:
Error when executing statement for table/stored proc. 'Employee' (structure 'Statement'): com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated
Employee is my Table Name and I have seventy odd fields in the interface
I have maped the action as INSERT
I have few date fields in the ms sql table. I am sending data in this format YYYY-MM-DD HH:MM:SS But when I imported th metadata of the SQL table to the PO server, I saw that these date fields are marked TIMESTAMP length = 16. Is that why I am getting error?
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harish,
As Stefan pointed out you are probably setting a value with more characters that the field support (String or binary data would be truncated. - SQL Server Performance).
Kindly try to talk with your DB team to check what is the maximum length of all the fields inside employee table; and if it is possible they give you a successful SQL INSERT sentence that you can use to compare with your request.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have few date fields in the ms sql table. I am sending data in this format YYYY-MM-DD HH:MM:SS But when I imported th metadata of the SQL table to the PO server, I saw that these date fields are marked TIMESTAMP length = 16. Is that why I am getting error?
No, this is not the cause of your error, as the error message would be different.
You have to go through all fields and check the valid length. You could create a user defined function that restricts the length of the fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Stefan
There are two Arabic fields. The field values are appearing in the target payload also. I have given them as string. Could they be the reason?
I checked all seventy fields and all have characters less than the one we are sending.
Since I am not usinng UPDATE_INSERT, I didn't use Key also
Hi Harish,
The issue may be with the data types.
As in the Table that data type and length for each fields are mentioned and the source value that is getting into the JDBC table are not in synch, hence this error.
The error for truncation is because of the length of the field value.
Suggest you to check with the DB team and give them the list of all field values and ask them to enter it in the table. This way it will be easier to see if these are the error possibilities.
can you please check below notes i had an issue in inserting Chinese characters in PI 711 some time back
SAP Note 102402 - Changing the database character set
SAP Note 456968 - Changing Database Character set - Valid
SAP Note 606359 - FAQ: Oracle National Language Support
SAP Note 831162 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 / PI 7.3
Thanks
1>>>
//
I have few date fields in the ms sql table. I am sending data in this format YYYY-MM-DD HH:MM:SS But when I imported th metadata of the SQL table to the PO server, I saw that these date fields are marked TIMESTAMP length = 16. Is that why I am getting error?
//
If it would be the case, then you should have received something like "Conversion which resulted in an out of range datetime value ".
2>>
//
There are two Arabic fields. The field values are appearing in the target payload also. I have given them as string. Could they be the reason?
//
Can you shared the resulted target payload. Can happen the structure generated after mapping is violating the one expected by the SQL.
Regards, Sujit
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.