Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove empty and non-alpha chars in string?
Message
De
11/01/2003 06:56:38
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Remove empty and non-alpha chars in string?
Divers
Thread ID:
00740604
Message ID:
00740604
Vues:
89
Hi all.
I have a small routine that builds the number of the next purchase order for a small company. What this does is: 1.- Takes de first 3 letters of the name of the supplier; 2.- counts how many orders this supplier has +1; 3.- counts how many p.o. have been made +1, and builds the number adding a '-' between the last 2 numbers so a p.o. number like KEY8-21 would mean 8 p.o. to supplier Keystone out of 21 total p.o.'s made. I want to avoid the possibility of a blank character in either the 2nd or 3rd position of the 3 letter string (ie. La Palma) and the elimination of non alphabetical characters (ie. O'Connor). ALLTRIM(), RTRIM() AND LTRIM() only remove trailing or leading blanks. How can I remove middle blanks and non alphabetical characters and still construct the 3 letter string with the remaining characters? (A supplier's name like 'La Palma' gives me a p.o. number like LA 8-21. I need LAP8-21)
Thank you for your time

Ulises
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform