Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple string manipulation problem
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00540244
Message ID:
00540279
Views:
14
If this is just a string that you are retrieving from a table, you could put a placeholder in the string, then use STRTRAN to replace the placeholder with the alias.

lcStr = 'where ALIAS.CODE # ALIAS.PARENTCODE .OR. ALIAS.PCOFLAG = "P"'

>Hi everyone,
>
>I have some expression, which is either filter() or for() or combination of both. I'd like to insert Alias Lnd1 before each field, which may be in this expression. Example:
>
lcStr=where CODE#PARENTCODE.OR.PCOFLAG="P"
>
>I need to convert it to 'where lnd1.code#lnd1.parentcode OR lnd1.PCOFLAG="P"'
>
>I was thinking about checking this string against each field and do simple strtran, but it would not work, since I have fieldnames, which are part of other field names.
>
>Could you please help me?
>
>Thanks in advance.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform