PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Unique Index compound Issue / Duplicate Record
Unique Index compound Issue / Duplicate Record
Débuté par Dave Summers, 10 avr. 2018 20:49 - 2 réponses
Posté le 10 avril 2018 - 20:49
Hi all

I have a strange issue with unique compound index;

WarehouseCode and LocationCode fields are both indexes (not unique)
WarehouseCodeLocationCode is a compound index of the above and is unique

if i create data WarehouseCode="MAIN" LocationCode="A1"
then i create data WarehouseCode="MAIN" LocationCode="A-1" i get a DUPLICATE error ?

against the individual field indexes, accent and punctuation sensitive settings are ticked.
against the compound index, accent and punctuation sensitive settings are unticked and 'greyed out/disabled'

Any ideas anyone ? help would be much appreciated

cheers
Dave
Posté le 10 avril 2018 - 22:25
Hi Dave,

the fact that the components of your compund index are indexes
themselves is irrelevant, and so is their settings

Your problem comes fro the fact that in the description of the
compositite key, your field is set as puncutation insensitive...

So, in the analysis, select the line of the composite key, click on the
edit button, and in the window that is opneing check the table on the right.

For each field of your key, you can check or unchek all the options,
individually

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


Le 4/10/2018 à 12:49 PM, Dave Summers a écrit :
Hi all

I have a strange issue with unique compound index;

WarehouseCode and LocationCode fields are both indexes (not unique)
WarehouseCodeLocationCode is a compound index of the above and is unique

if i create data WarehouseCode="MAIN" LocationCode="A1"
then i create data WarehouseCode="MAIN" LocationCode="A-1" i get a
DUPLICATE error ?

against the individual field indexes, accent and punctuation sensitive
settings are ticked.
against the compound index, accent and punctuation sensitive settings
are unticked and 'greyed out/disabled'

Any ideas anyone ? help would be much appreciated

cheers
Dave
Posté le 11 avril 2018 - 10:38
[SOLVED]

Many thanks Fabric, that has solved the issue, once again you have provided tremendous help

Very much appreciated

Dave