Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seting field width on calculated fields.
Message
From
31/03/2000 18:27:28
 
 
To
31/03/2000 18:15:18
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00353697
Message ID:
00353710
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform