Abraham Olatubosun

Abraham Olatubosun

  • NA
  • 471
  • 107.3k

How to Get the Last Record from SQL Table

Apr 10 2017 9:13 AM
Hi my code masters, i have setup a table called tbl_RADET below is the image of data's imputed by our data entry clarck.
 
we have about 12,000 record in this table, the paitentID is duplicated due to different date of facility visit,  i want to retrive the record with the most current date, from this table i have use lot of sql statement but i am not geting the desired result, i have also used
  1. select  * from tbl_RADET where ptn_pk ='4020' order by lastdrugpickup desc 
 the SQL statement above did not give the right result, from the above we can see that line 17 is the expected result.
please i need your help. thank you

Answers (11)