Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where ALLTRIM fears to tread..
Message
 
 
À
04/06/1998 08:42:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00104289
Message ID:
00104788
Vues:
23
Ashley,

You do not want to use alltrim() on a column in a SQL statement, because the result column will take on the width of the first record in the result set. If the first record is "ABC" the column will only be 3 characters wide even though all the other rows may need more space. The best thing to do is alltrim() the column after the array is built by the SQL.

>I am passing the status field of the contract into the function through an SQL select. SQL columns have to be a set width, which stands to reason, so consequently, when I pass the field over, SQL sets the column width up as c(20) which is the same as the field that the value is coming from. Now that makes sense, what still gets me is the fact that the value is being passed into the function as a parameter and it is the parameter itself which cannot be trimmed, it is as if the SQL has fed through to the function and made this parameter read only, although UPPER() still works ok.
>
>The workaround I have made is just to make the various array elements 20 character wide as well and padded them out with spaces. Messy, but at least I can get on with things now.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform