Unanswered: Confused about Implicit Data Conversion Error
Hope that somone can shed some light...
I am using the HitSoftware driver to pass data to an AS400 from a SQL 7 database. Data makes it fine to 2 of the 4 tables but I cannot get the syntax correct to even get out of the S/P edtitor in SQL for the other 2.
I have fields in the SQL S/P defined as VARCHAR. The target fields on the AS400 are ALPHA. So I figured the insert statement to look like:
The INVF30 field is zoned decimal. The 1 with no CONVERT in the insert statement is that value I am trying to use.
If I change one of the CONVERT functions from binary to char where the target field is ALPHA, the implicit conversion comes. Just doesn't seem right...if I am dealing with ALPHA and VARCHAR how is it getting an error dealing with binary.
I do not know what kind of db is on the 400. "They" kind of said "here is that tables you need to write to and the Hit Software driver we are evaluating". I did look at the table structure and the fields are CHAR not
the mis-informed ALPHA i mentioned earlier.
So, shouldn't VARCHAR to CHAR work? I did try declaring variables defined as CHAR and then Selecting the VARCHAR values into the variables. Then used those to send to the 400. Figured CHAR going to CHAR might net a different behavior. But, I could not get out of the S/P editor window due to the implicit erorr binary message.
I have never done this before. Currently, the production system is using Symbiator to perform the data transfer task. Symbiator is going away here and they need to get the data to the 400 via an alternative means.