Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To: ALways return a positive value
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01245031
Message ID:
01245032
Vues:
16
This message has been marked as the solution to the initial question of the thread.
See ABS() function.

>In the statement below, this returns the correct value, which often is a negative number (almost always) which it should. But I want to bring it back as a positive value. Does SQL have a method to do that?
>
>
>
>cast(isnull(datediff(mi,meetings.PacuEnd,meetings.DischargeTime),0) as int) as DiffMinsPacuEnd_Dis
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform