× 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.



One of two ideas you could try.

1. Create new table same as the source, insert into this table in the order of the first target table you are attempting to insert into. Use this new table as the insert source and where the insert stops at should be the one record before the duplicate.

2. This will be extra work on your part.

Create a view over the table being inserted.
Create an instead of trigger that monitors for insert issues and when it occurs you will have the single insert record that caused the problem and you can record it to another location or produce a message in the job log. The trigger could even be designed to just report the error and skip to the next insert record.

This will be slower to process inserts but you need the values in the database.

Sample from ACS 1.1.7.3
-- category: Data Definition Language (DDL)
-- description: Create or Replace Trigger Instead of Insert
create or replace trigger TRIG2
instead of insert on VIEW1 referencing new NEWROW
for each row insert into TABLE1(COLUMN1, COLUMN2) values(NEWROW.COLUMN1, encrypt_rc2(NEWROW.COLUMN2, 'pwd456')

);

-Matt


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Justin Taylor
Sent: Thursday, March 1, 2018 2:07 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: What column "Character in CAST argument not valid"?

So nothing from Db2. Thank you



-----Original Message-----
From: Musselman, Paul [mailto:pmusselman@xxxxxxxxxxxxxxxx]
Sent: Thursday, March 01, 2018 2:45 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: RE: What column "Character in CAST argument not valid"?

You don't have to "Christmas Light" them-- use a binary apply-- load the first 4500 records. If they succeed, good. If they fail, keep splitting the block in half until you find THE record(s).

Paul E Musselman
PaulMmn@xxxxxxxxxxxxx


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Justin Taylor
Sent: Thursday, March 01, 2018 3:42 PM
To: MIDRANGE-L (midrange-l@xxxxxxxxxxxx) <midrange-l@xxxxxxxxxxxx>
Subject: What column "Character in CAST argument not valid"?

I'm getting this error on a SQL INSERT, and I'm trying to determine what column has the problem. Is there any way to coax Db2 to tell me?

The INSERT's are dynamically generated, the table has 66 columns and I have about 9K rows to write. I'm trying to avoid the old "Christmas light" method, where I have to check each column/row individually.


TIA


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.midrange.com_mailman_listinfo_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=zqSws5qTTRxudUxyTAcJ0AA8dZpg70X0UrPcNtU2B4k&s=j37SNA8XfpCBDQwv-KjoYzv7_GvaZfzmrtPxASC-zdI&e=
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at https://urldefense.proofpoint.com/v2/url?u=https-3A__archive.midrange.com_midrange-2Dl&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=zqSws5qTTRxudUxyTAcJ0AA8dZpg70X0UrPcNtU2B4k&s=CFjtFFB9nQcf-2rGGbD1nWIrHqwTfvyFafGpGC_0CFo&e=.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://urldefense.proofpoint.com/v2/url?u=http-3A__amzn.to_2dEadiD&d=DwICAg&c=2S-2xx8Cum_thMfWs-kOOHQTwolPvSZ4PFLhr1wDDGs&r=wgq2KO1Tl8HswJht2RKpmz7qvL2YDU_M-VhnRH6r43I&m=zqSws5qTTRxudUxyTAcJ0AA8dZpg70X0UrPcNtU2B4k&s=W9k_gm33k88c7iIoPm4ldEAMeB5IJ5DYEG4qexGRtq8&e=

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.