in reply to Inserting values in to table with DBI

In another node you write that you get the following error:
String or binary data would be truncated, terminating
when executing
update <table> set Adapted_code = 'A' + code ...
This means that "Adapted_code" is not large enough to hold the value of "code" plus one extra character.

I haven't checked your other nodes, so I don't remember off-hand what the definition of the two columns are, but "Adapted_code" needs to be at least one char wider than the widest string in "code".

If I remember correctly you want to UPDATE each row of your table, not insert NEW rows. That is NOT what your code snippet above does - it tries to insert NEW rows into the table using default values for all the columns except "Adapted_code".

Michael