Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seting field width on calculated fields.
Message
De
31/03/2000 18:27:28
 
 
À
31/03/2000 18:15:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00353697
Message ID:
00353710
Vues:
20
Terry,

>Cool, Thanks I hoped it would be something like that. I just forced it with 100 - caredays() AS CareDays and then did a REPLACE ALL CareDays WITH 100 - CareDays - VERY BAD CODE! (Ugly & won't work on cursors). I will use your technique on all future SQLs

That won't help you very much in itself -- it was just to illustrate that you can return a numeric with more than 1 digit by adding zeroes in front. You will have to do something in your function to return a numeric with more than 1 digit.

Someone else may have a more elegant way, but here are a couple of ideas for starters. Assume you have a local variable in your routine called nRetVal, which holds the number from 1 to 31.
RETURN 99-99+nRetVal
gives you an 11-digit numeric in the SELECT, and
RETURN VAL(STR(nRetVal,2))
gives you a 5.2 numeric.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform