Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting from string or numeric to currency
Message
De
13/03/2002 21:59:12
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Converting from string or numeric to currency
Divers
Thread ID:
00632540
Message ID:
00632540
Vues:
44
I’m retrieving a field from a table which will end up as one of two fields depending on the logical value of another field:

IIF(MyTable.lLogical,VAL("0000000000000000.0000"),MyTable.nMyCurrencyField) as Field1, ;
IIF(MyTable.lLogical, MyTable.nMyCurrencyField, VAL("0000000000000000.0000")) as Field2

The problem is that the function VAL as applied returns a field of type n(20, 2) instead of a currency field making me lose the last two decimals and of course a very long field.

Is there a way to obtain a cero value currency field when the other field gets its value from its based currency field? Some kind of a NumericToCurrency() function?

Any advise will be very helpful.

Regards and thanks in advance

Oscar
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform