Solution dans VB
Bonjour, la fonction format peut t'aider à faire cela...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Dim m_Cmd As New ADODB.Command
Dim rs as new ADODB.recordset
Dim monResultat as String
monResultat=""
m_Cmd.ActiveConnection = maconnection
m_Cmd.CommandTimeout = 0
m_Cmd.CommandType = adCmdText
m_Cmd.CommandText = "Select sum(a/b) AS Result from table1"
set rs = m_Cmd.Execute
if not rs.eof then
monResultat = format ( rs("Result") , "##,##0.00")
end if
Set rs = Nothing
Set m_Cmd = Nothing |
Solution dans la requête SQL: le mot-clé ROUND
SELECT ROUND( A/B , 2) FROM TABLE1
Partager