× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 11/19/2024 2:19 AM, Dave wrote:

Is there any way I can avoid this error when Inserting from a table to a
physical file? I would like the data to simply be truncated. A part from
adding the substring function of course.

'Easy' is always subject to interpretation, but I'll respond in the hope that it triggers other ideas.

Create a new, temporary, empty table (CRTDUPOBJ will work) and then ALTER TABLE to make the column(s) you need larger. INSERT INTO the temporary table. CPYF FMTOPT(*MAP) from the temporary table to the actual destination table.

This could be automated by reading SYSCOLUMNS and then generating ALTER TABLE statements that are ridiculously long (ie LENGTH + 1000). Of course if going this route, one could also write a program that generates the INSERT statements to substring every character column...

Some ideas to kick around.


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.