Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Candidate index on two fields
I have a text field and an integer field which need to be in a candidate index. They look like this:
GROUP1 0
GROUP1 1
GROUP1 2
GROUP2 0
GROUP2 1
GROUP3 0
GROUP3 1 ...and so on.
I tried txtfield + STR(intfield) and it tells me that uniqueness is violated. I tried various expressions employing LTRIM(), RTRIM(), ALLTRIM(), PADL() and PADR of either or both fields and it still says that. I tried these same expressions in a SQL statment. Using SELECT and SELECT DISTINCT followed by ?_TALLY shows the same number of records. There are only 19, so it isn't hard to BROWSE and see that they are different.
What is the right way to do this?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement