Sounds like the index is define as PADDED then varchar are simply stored with no length bytes and padded with spaces. Drop and recreate as NOT PADDED and all will be well.
However there *were* some programs decades ago that did not like varchar in indexes...
Roy Boxwell
SOFTWARE ENGINEERING GmbH and SEGUS Inc.
-Product Development-
Vagedesstrasse 19
40479 Dusseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email:
R.Boxwell@seg.deWeb
http://www.seg.deLink zur Datenschutzerklärung
Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Ulf Heinrich
Original Message:
Sent: 3/30/2023 8:49:00 AM
From: Richard Janni
Subject: Insert rows with varchar column in unique index.
I'm trying to insert a row into a table with a varchar column in the unique index. A row exists with a value of 'ABC'. When I try to insert a row with a value in that column of 'ABC " (space after ABC), I'm getting a duplicate key error. Is this working as designed? Is there a ZPARM to modify this behavior? Thanks in advance for help.
------------------------------
RichardJanniWakefern Food Corp.
------------------------------