Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change in Decimals
Message
 
 
À
05/04/2003 02:15:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00774379
Message ID:
00774433
Vues:
13
This message has been marked as a message which has helped to the initial question of the thread.
>Hi Everybody.
>I have a table, which contains a numeric field as AMOUNT N(4,2). I thought it would allow the maximum value as 9.99. But, it accepts all other values. Following are my observations –
>REPLACE AMOUNT WITH 9.99 – value becomes 9.99
>REPLACE AMOUNT WITH 99.9 – value becomes 99.9
>REPLACE AMOUNT WITH 0 – value becomes 0.00
>REPLACE AMOUNT WITH 999 – value becomes 999
>REPLACE AMOUNT WITH 9999 – value becomes 9999
>REPLACE AMOUNT WITH 99999 - numeric overflow (may be as total lenght is 4)
>
>This behavior I observed in FPD2.6 as well as VFP6. When I am specifying the length as 1 integer and 2 decimals, why it is accepting the other values?

Hi Yashodhan,

That's the way it worked always in Foxbase/Foxpro. It's the same as with silently truncating the string when you put in the shorter field in a table. FoxPro just trying to be helpfull.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform