billster Posted February 8 Share Posted February 8 Hello, I am running a report and I want to do a LIMIT BY 1 to get the latest record in the table as it is pulling through every record there is (per Request ID). I want to have only the record which is circled in blue. here is how I am getting the report... Link to comment Share on other sites More sharing options...
Jim Posted February 8 Share Posted February 8 (select h_pk_updateid as test from h_itsm_requesthistupdates WHERE h_itsm_requests.h_pk_reference = h_itsm_requesthistupdates.h_fk_reference Order by h_pk_updateid desc Limit 1) 1 Link to comment Share on other sites More sharing options...
billster Posted February 8 Author Share Posted February 8 32 minutes ago, Jim said: (select h_pk_updateid as test from h_itsm_requesthistupdates WHERE h_itsm_requests.h_pk_reference = h_itsm_requesthistupdates.h_fk_reference Order by h_pk_updateid desc Limit 1) perfect, works a treat Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now