Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Never seen this one before... what do I do?
Message
From
30/06/1999 19:55:47
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00236177
Message ID:
00236230
Views:
11
I can't tell you for sure. The way that I learned this was trying to get an empty numeric field in the results of a cursor, and getting it big enough to be able to put decimals in later.

SELECT 0.000 AS NumField

did not work.

SELECT 1.000 * 0 AS NUmField

Does. Go figure. Something to do with how SQL decides to format the column before the SELECT ever runs.


>THANKS Erik... that worked perfectly! But that is a "work around" isn't it? Am I not understanding something, why does it drop the decimals when the return value at the RETURN statement in the function has the decimals???
>
>>Try this:
>
>> SELECT table.fieldone, table.fieldthree, table.fieldthree,;
>> 1.000 * GetAmount(table.duedate) AS howmuch ;
>> FROM table ;
>> INTO CURSOR cTemp
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform