Ciao.

Eseguo questa query di somma valori:
codice:
if unita <> "" then
ARR_DALFORM = split(unita, "-")
unita0 = ARR_DALFORM(0)
unita1 = ARR_DALFORM(1)
sumSQL = "select sum(somma_record) as tot_record from tabsf6 where id_unita = "& unita0 &" and servizio = true "
else
sumSQL = "select sum(somma_record) as tot_record from tabsf6 where servizio = true "
end if
response.write sumSQL &"
"
set rec = conn.execute (sumSQL)
tot_record = formatnumber(rec("tot_record"),3)
Se unita ha dei record nel db è tutto ok, mentre se non ha nulla la pagina restituisce:

Error Type:
Microsoft VBScript runtime (0x800A000D)
Tipo non corrispondente.: 'formatnumber'
Come risolvo?

Grazie