How do I get a distinct count using the code below:
Command1.CommandText = "SELECT Count(account_no) FROM fphistory " &
"WHERE arr_date <= '12/31/2021'"
Try
Invoke(Sub() Total = Convert.ToInt32(Command1.ExecuteScalar))
Catch SqlExceptionErr As SqlException
MessageBox.Show(SqlExceptionErr.Message)
End Try
Any help would be appreciated.