Hi everyone, I need help with this SQL query, First sample the count should be 2 from the first 3 rows, I want to count all the fails where by name and date like yyyy-MM-dd... Second picture should be count "1" because in the first three rows has a RESULT of "fail" how can I do that? Thanks for the help.
Im counting it like this:
Dim CHOS As String = "%"
Dim cmd2a As MySqlCommand = conn.CreateCommand()
cmd2a.CommandText = "SELECT COUNT(RESULT) FROM rsv.esd_reco WHERE NUMBER = '" & TextBox1.Text & "' AND RESULT = 'fail' AND DATE LIKE '" & Label2.Text & CHOS & "'"
cmd2a.CommandType = CommandType.Text
Dim count2 = cmd2a.ExecuteScalar()
Label3.Text = count2