Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing problem
Message
De
10/12/1998 14:32:06
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00166135
Message ID:
00166262
Vues:
17
Mark,

Since the seek values come directly from fields in another file, e.g. filename.field1+filename.field2, the length of field1 is 50. As a result, it seems that the PADR function is not necessary.

Alan

>To help clarify, I removed the angle brackets from this message.
>
>I've run into an unusual situation. I have a data file which among others, has two fields: field one is a character field, length 50, and contains peoples names in the format 'lastname, firstname'; field two is a character field, length 6, and contains alphanumerics such as 'ABBR01' (the last two positions are numbers). If I set the index to fieldone+fieldtwo, I get a successful result with a seek command, but only if the seek term is the name only. For example, if the seek term is 'lastname, firstname' it works. If the seek term is 'lastname, firstname'+alphanumeric it doesn't work - I get a 'not found' message. I have checked and doublechecked the seek term and index terms to make sure they match.
>
>If I reverse the sequence of the index terms, that is, I make the index and seek terms fieldtwo+fieldone, it works.
>
>Has anyone encountered this or can anyone explain it?
>
>Thanks

>
>You have created an INDEX ON FIELD1 + FIELD2 TAG SOMETAG, or even better:
>
>INDEX ON UPPER(FIELD1 + FIELD2) TAG SOMETAG
>
>When you do a seek with info from both fields, your concatenation must be exactly 50 characters for the first field then concatenate the second field to the seek parameter. You can use the PADR() function to add trailing blanks to the lastname, firstname.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform