Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem With STREXTRACT()
Message
De
24/03/2013 15:43:21
 
 
À
24/03/2013 15:15:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01569150
Message ID:
01569157
Vues:
42
I will check it up,Thanks



>>I am using STREXTRACT to Extract Data from String. Using the following code I am Getting my Required Data but in some cases as the Data format change STREXTRACT () returns an empty value. Can STREXTRACT can be used to extract Data in both the cases, if whats the best alternative ?
>>
>>
>>cCustomerType=STREXTRACT('F1 B (Customer Type            RETIRED)396 680 w','',')') && returns RETIRED as required Value correct 
>>
>>
>>But in some cases I have Data as
>>
>>
>>cCustomerType=STREXTRACT('F1 B (Customer Type            RETIRED DOT )396 680 w','',')') && returns Empty Value
>>cCustomerType=STREXTRACT('F1 B (Customer Type            RETIRED DOT)396 680 w','',')') && returns Only DOT and I need RETIRED DOT
>>cCustomerType=STREXTRACT('F1 B (Customer Type          SL  RETIRED DOT)396 680 w','',')') && returns Only DOT and I need SL RETIRED DOT
>>
>>
>>i.e I need Everything inside the the Two brackets except Customer Type. Does STREXTCAT can be used in above cases. How ?
>>
>>Regrards
>>Harsh
>
>Here's a try:
>
>cCustomerType = alltrim(strextract('F1 B (Customer Type SL RETIRED DOT)396 680 w',"Customer Type",")"))
>
>There might be other variability you haven't described, but this works for the 3 instances you mentioned.
>
>hth,
>
>Hank
Harsh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform