Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP to return a cursor
Message
 
 
To
05/08/2009 17:33:30
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
01416077
Message ID:
01416336
Views:
52
>>>The source cursor was created via
>>>select dist fundtype, ;
>>>	cast(000000000000.00 as N(15,2) NULL) as priorpmt,;
>>>	cast(0000000000 as I NULL) as thisyear, ;
>>>	cast(0000000000.00 as N(13,2) NULL)as spent, ;
>>>	cast(0000000000.00 as N(13,2) NULL) as currentbalance, ;
>>>	cast(0000000000 as I NULL) as futureprogram, ;
>>>	cast(0000000000.00 as N(13,2) NULL) as total ;
>>>	from tipdatabase!fundtypes ;
>>>	order by fundtype ;
>>>	into cursor crsTemp readwrite
so the datatype for thisyear is integer although there are also number fields I will have to deal with in similar fashion. I think my second sample was taken directly from the site shown in your link.
>>
>>If the ThisYear is Integer, why do you want to display it in the money format? May be you wanted another field, say, Spent ?
>
>The entire table is money. Budgets are kept in whole dollars hence integer for efficiency. Expenses however carry the pennies hence a decimal value.

Anyway, cast everything to N(13,2) or to Currency. Does the formatting code above work for Numeric fields?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform