Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Never seen this one before... what do I do?
Message
De
01/07/1999 12:19:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00236177
Message ID:
00236516
Vues:
8
Mark,

The situation is basically that Select will take the length of the *first* field returned and use that length for the field for all subsequent records returned. So that even with a simple thing like ...IIF(x > y, "NO", "YES"), if the first result is a "NO" then any yeses will appear as "YE". So it is always safest to either make sure that any function always returns information of identical length *or* to adjust the returned value (using PADx or 001.000(as many zeroes as needed)*result). In the example above I would code "NO " to cover this.

Cheers,

Jim N

>>Just a word of caution that you can/will have the same problem with character
>>fields, given the right circumstances.
>
>As a result of this I went back and looked at a few functions that return character data to a SELECT, but they all seem to work. What "circumstances" might cause a problem like you mention with character data?
>
>>And when the boss asks, tell him that you still don't know everything yet,
>>but you continue to work on exactly that.
>
>Some bosses seem to expect perfection! I often wonder when was the last time they looked in the mirror??? :)
>
>Thanks Jim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform