Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dividing 10 by 100
Message
De
19/10/2004 23:59:16
 
 
À
19/10/2004 23:48:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00952879
Message ID:
00952880
Vues:
13
This message has been marked as the solution to the initial question of the thread.
Hi, Mike,

If you're looking for the remainder of one number divided by another, try this...

SELECT 10 % 100, that should return 10

(check for more details in the Books online help)

If, however, you're just looking for the result of 10/100 as .10, then I believe something like SELECT ROUND(10.00 / 100.00,2) will give you .10

If you're using variables as decimals, the following should return .10 as well...
declare @n1 decimal(14,2)
declare @n2 decimal (14,2)

Set @n1 = 10
Set @n2 = 100

select @n1/@n2
Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform