Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
11
Reply
How to Get the Last Record from SQL Table
Abraham Olatubosun
Apr 10 2017 9:13 AM
461
Reply
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
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
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
11
)
Next Recommended Forum
check if value already exist
Event Schedule for update or insert data every month