Subject Re: ISC ERROR CODE:335544665 PK-Constraint in stored procedure, not debug mode!?!
Author crizoo4712
Hello Helen, thanks for your help on my issue!

The following insert-statement causes the pk-constraint:

insert into subscriber_resources2
values (null, :p_resource_ins, :p_carrier_import, :p_carrier_imp_date,
:p_carrier_export, :p_carrier_exp_date, :p_cov_id, :p_date_activ
e)

The pk-constraint is on the column which is provided with the value
of the parameter-field "p_resource_ins" which contains a varchar(20)
value, which contains phone-numbers. These have to be unique.
and the parameter which I want to write into the table is provided
like this before:

p_resource_new = p_resource_root || cast(p_counter as varchar(2));
p_counter = p_counter + 1;
p_resource_ins = null;
p_resource_ins = substr(p_resource_new,1,20);

As You can see, the uniqueness is provided by increasing a counter.
The issue is just to extend phone numbers from (e.g.) '0561-4711' to
'0561-47110', '0561-47111', ... '0561-47119'. Nothing else.
I checked the stuff out by debugging and it worked, not in run mode.
What's up here?

Thanks, Christoph