Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seting field width on calculated fields.
Message
From
31/03/2000 18:11:11
 
 
To
31/03/2000 17:51:27
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00353697
Message ID:
00353701
Views:
14
Terry,

>I have an SQL Select driven report in which I use a custom function to calculate one of the fields. The returned values are typically between 0 & 31 ( care days ). The problem that arrises ( as you have no doubt already sermised) is that the early returns are 1 digit 0 - 9 and later when one comes allong that is double digit 10 - 31 the table receives * for out of range. How do I squach this pest.

I assume you are returning a numeric value from the custom function. I just tried this:
SELECT *, dsnum() AS numb FROM labels
DISP STRU

DSNUM.PRG contains:
RETURN 1
You get a 1-digit numeric field, but changing to
"RETURN 0001"
you get a 4-digit numeric field.
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