Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
John,
1. I assume you have index on field1 + field2 tag myindex.
In this case the search string must contain the first pattern mystr1 having exactly the length of field1. So probably you should use :
?seek(padr(mystr1,len(mytable.field1))+mystr2,”mytable”,”myindex”)
2. Does set exact on/off affect the behaviour?
>I have an interesting problem (at least I don't understand what's wrong) I have a table indexed on two (2) string fields. Indexed on “str1+str2”. However, when I attempt to seek on the index using the two strings it returns a .f.
>
>as in seek(mystr1+mystr2,”mytable”,”myindex”) returns false.
>
>If I check the fields in the table I find they match. I'm using the program to check the fields against the strings.
>
>?table.field1 == mystr1
>?table.field2 == mystr2
>
>Both return true. Of course I place cursor on the correct record.
>
>Does anyone understand why this is not working? Is there something I don't understand about the index?????
>TIA
>
>John
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