Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Never seen this one before... what do I do?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00236177
Message ID:
00236260
Vues:
13
Mark,

Try SELECT .... 000.000 + GetAmount() ...

>I have a SELECT statement which uses a function that returns a numeric value as one of the fields, like so...
>
>SELECT table.fieldone, table.fieldthree, table.fieldthree,;
>GetAmount(table.duedate) AS howmuch ;
>FROM table ;
>INTO CURSOR cTemp
>
>The format of the function is like this:
>
>FUNCTION GetAmount
>LPARAMETERS
>LOCAL lnReturnValue
>STORE 0 TO lnReturnValue
>
>RETURN lnReturnValue
>
>The problem is this, I have used the debugger to confirm that the function returns values with decimals, like 524.56, BUT the amount that ends up in the "howmuch" field from the AS part of the SELECT statement is 525, not 524.56. So, how do I maintain the decimals when I get the value from a function called within a SELECT statement?
>
>Thanks.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform