Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>>>The question is, why does it work the first place. Or why does it stop there.
>>>>
>>>>Because you just add two numbers.
>>>>INDEX ON 8234445+7263482 TAG ...
>>>>And with that sum you can have many values that are the same,
>>>
>>>nope, its INDEX ON '8234445'+'7263482' TAG ...,
>>>sys(2007 returns a string
>>>the problem is, the string is not of constant length, and this should not work as index.
>>
>>The index always accepted variable length strings. In cases where the function, like sys(2007) returns variable length, you have to pad it out, as I understand it.
>
>When the index is created, it takes the length of the value as the length of the index. So depending on what's in the first record at that moment you get different lengths and then for other records the tag value is stored in that length. Perhaps you accidentally had one in the command window which evades the error, and another one when running the code?
Perhaps Lutz did, yet.
Précédent
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