Android Question How can i exclude empty score and grade from the list using sqlite clauses

Makumbi

Well-Known Member
Licensed User
Please help how can i modify this code to exclude empty score and empty grades from the list using sql lite
B4X:
    Dim rs As ResultSet  = B4XPages.MainPage.SQL.ExecQuery2("SELECT DISTINCT Names,Class || Stream As CS,Subject,Total As Score,grade as Grade,Term,Years FROM Academics WHERE  grade>=0 and Phone = ? ORDER BY Grade ASC, Total DESC;", Array As String(Phonet))

    Do While rs.NextRow
        Dim row(6) As Object
    
        row(0) = rs.GetString("Names")
        row(1) = rs.GetString("CS")
        row(2) = rs.GetString("Subject")
        row(3) = rs.GetString("Score")
        row(4) = rs.GetString("Grade")
        row(5) = rs.GetString("Term")
        data.Add(row)
    Loop
    rs.Close
    B4XTable2.SetData(data)
 

Attachments

  • Screenshot_1620297870.png
    Screenshot_1620297870.png
    54 KB · Views: 99
Top