Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Decimal places
Message
De
24/02/2015 17:08:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
24/02/2015 13:21:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01615791
Message ID:
01615802
Vues:
42
>Hi All:
>
>What determines the length of a calculated numeric field in SQL? In the following example I was expecting no decimal places, since the calculated field in the first record was 0. However, lo and behold, the structure is N(10, 4). Where did the SQL get that?
>
>I used this test because in the real environment I was getting either '0' or '*' in all the records and I was trying to figure out a way to 'force' a N(10, 5).

Well the longest from that is -999/1, four integer digits. The minimum of it is 1/999, so it concluded that beyond about four digits the result would have the same number of significant digits as the operands. Thus four integer digits, four decimals, sign - n(10,4) (doesn't store the point, IIRC, but usually adds one digit for that guy Justin Case. It simply has to fit the longest possible results.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform