Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Extracting Table names from expression
Message
De
21/07/1997 11:10:48
Vinod Parwani
United Creations L.L.C.
Ad-Dulayl, Jordanie
 
 
À
21/07/1997 10:47:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00040822
Message ID:
00040930
Vues:
35
>>
>>it is somewhat hard to know where a table name begins in (at least for the examples
>>you gave you can find where each name ends with an AT() and other such commands
>>if there was a space before each table it would be easier
>>note however that what ever you do will also return object names from expressions
>
>
>If your expression always uses '.' and '*' characters, how about something like this:
>
>

>lcInput = 'mytable.amount*yourtable.rate*anotherTable.taxes'
>
>DO WHILE LEN(lcInput) >0
>
> *search for the first dot
> ? substr(lcInput, 1, AT('.', lcInput)-1)
>
> *search for the next table
> lnNextTable = AT('*', lcInput)
> IF lnNextTable > 0
> lcInput = substr(lcInput, lnNextTable+1, LEN(lcInput))
> ELSE
> lcInput = ''
> ENDIF
>
>ENDDO
>
>Claude

Actually, expression can be any char/numeric/logical...

But I guess, this is starting point... I will give it a try..

Thanks...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform