Ciao,
ho questo codice:
Codice PHP:
StrSQL2 = "SELECT COUNT(DISTINCT IdNazione) AS TotaleNazioni FROM Cas;"
Set ObjRS2 = Server.CreateObject("ADODB.Recordset")
'response.Write(strsql2)
'response.End()
ObjRS2.Open StrSQL2, ObjConn, 3, 3
If Not ObjRS2.EOF Then
Response.Write("
"&ObjRS2("TotaleNazioni")&"</p>")
Else
...
End If
ObjRS2.Close
Set ObjRS2 = Nothing
peró mi restituisce errore:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
Error di disntassi (manca operatore) nell'espressione 'COUNT(DISTINCT IdNazione)'.
Che significa? Che manca?
In pratica vorrei estrapolare il totale di tutte le nazioni presenti, contate peró una sola volta ciascuna.