Hi Dave

It depends on what your objective is. Do you want to truncate the data in the alphanumeric field? Or does it merely contain whitespace at the end? Or do you want to ignore the failing insert and move on?

Truncating needs a substring() function, trimming of whitespace can be done via trim() and to ignore you need a continue handler on SqlState '22001'.


Kind regards,



Martijn van Breden

lead software architect




Hello,

How do I get an insert to work when the alpha-numeric data from a DB2 table
column is too long for the field in the receiving physical file? Apart from
hard coding the length of course.

Thanks


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.