Hi,
I need to extract the most recent record of a certain Id, is this way correct or there is a more quick and elegant way using the Max function ?
Thanks
I need to extract the most recent record of a certain Id, is this way correct or there is a more quick and elegant way using the Max function ?
B4X:
Dim Cursor1 As Cursor
Dim query As String="SELECT * FROM records WHERE ID = John ORDER BY InsDate DESC LIMIT 1"
Cursor1 = MySub.SQL_Bls1.ExecQuery(query)
Cursor1.Position=0
Log(Cursor1.GetString("InsDate") & " - " & Cursor1.GetInt("Size"))
Thanks