SQL Insert Command Error

bnfusa

Member
First of all let me say I am new to Enterprise One, I have been developing/using World from 87 for quite a time and we are now upgrading.

That said I have normally been able to perform a SQL insert statement to populate tables in the old AS400. But when I am performing a insert into a z file on the new iSeries so that I can upload al our old customers I get a error.

[SQL0420] Character in CAST argument not valid

I have looked over my statement and it all seems to be right, but I always get the error. I know I can use SQL to insert data into the new system because I created a table and then tested my commands.

Can anyone help a newbie to Enterprise One?
 
You might want to post your command. Could be a data type mismatch in the CAST area of the command.

Regards,
 
Here is the command:

Insert into F03012Z1 (VOEDUS, VOEDBT, VOEDTN,VOEDCT, VOEDDT, VODRIN, VOEDSP, VOTNAC, VOAN8, VOCO, VOEXR1, VOHDAR, VOTRAR, VOSTTO, VOSTMT, VOATCS, VOSITO, VOSQNL, VOALGM, VODLC, VODNLT, VORVDJ, VOAFC, VOCFCE, VOABC1, VOABC2, VOABC3, VOBADT, VOEXHD, VOAFT, VOAPTS, VOSBAL, VOBACK, VOPORQ, VOPRIO, VOARTO, VOICON, VOBLFR, VOPLST, VOMORD, VOVUMD, VOWUMD, VOEDPM, VOEDAD, VOEDF1, VOSI01, VOSI02, VODSPA, VOAMCR, VOUSER, VOPID, VOJOBN, VOUPMJ, VOBYAL, VOAPSB) values ('CONVERSION', '1', '1', 'CM', 105089, '1', 'N', 'A', 0000001, '00000', 'E', 'N', '4', 'C', 'Y', 'Y', 'C', '6', 'U', 105089, 'Y', 105089, 'N', 'N', 'C', 'C', 'C', 'X', 'N', 'Y', 'N', 'Y', 'Y', 'N', '0', 'C', 'N', 'D', 'Y', 'Y', 'FC', 'LB', 'P', 2, 'N', 'Y', 'Y', 'Y', 'Y', 'CONVERSION', 'SQL', 'CONVERSION', 105089, '1', 'N')

Thanks for all the help in advance.
 
where is this being attempted from? You indicated you were on the iSeries, but I don't see a library qualifier in your statement.

Also, certainly could be new items, but I don't see the data items BYAL or APSB in the XE DD I'm in. I'd verify that that column and data items exist. Like I said, they might be new in 8.X, so I'm not sure if that is causing any issues.

Just so you know, when I eliminated those two items and tried to do the insert...SQL returned the error "msg: 8114 - Error converting data type VARCHAR to FLOAT", so I'd say your issue is wrong format of one of your data points. Which one?? Hope some guru sees you post and tells you, otherwise I'd start looking up the data items in the DD and see which one is causing the issue.

Regards,
 
Got it!!!!

My consultants told me a field definition wrong, that will teach me.

As Ronald Reagan said, "Trust, but verify"

Thank for the help anyway.
 
Back
Top