Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strtran() in SQL where clause
Message
De
28/08/2002 10:17:54
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00694135
Message ID:
00694433
Vues:
18
I think like you, that the current record is used. So, as long as there is a record, it is the same as any other field, is it not? For instance, if I have an INDEX on City, one record might have "TORONTO" and the next might have "NIAGARA ON THE LAKE" and they both work fine. Or am I missing some other point here?

cheers

>I don't know for sure but I think it uses current record in the table not the first one. Here's the test
CREATE CURSOR testxx ( c1 C(20))
>INSERT INTO testxx VALUES ("Line 1")
>INDEX ON STRTRAN(c1, " ", "") TAG c11  && No error
>INSERT INTO testxx VALUES ("")
>INDEX ON STRTRAN(c1, " ", "") TAG c11  && Error "Invalid key lenght"
>GO TOP
>INDEX ON STRTRAN(c1, " ", "") TAG c11  && No error
>
>
>
>>>This index will be used by Rushmore. However, it isn't relable because the lenght of the index key depends on the record VFP uses to determine it. If table is empty, you wouldn't be able to create such index at all.
>>
>>Your second point makes the case for me!
>>
>>As regards the length of the index key... does INDEX ON operate the same way that SQL-Select does as to the way SQL uses the first (qualifying?) field's content to establish the length of all output of the field? It seems most unlikely to me that INDEX ON would operate that way.
>>
>>thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform