I’m from an access background with a little mySQL, so I’m slightly lost when it comes to SQL.
Here is the query I am using:
Select
tbl_AcerPFSSurveyIVR.NTlogin,
tbl_AcerPFSSurveyIVR.Customer_Firstname,
tbl_AcerPFSSurveyIVR.Customer_Lastname,
tbl_AcerPFSSurveyIVR.CaseId,
tbl_AcerPFSSurveyIVR.ContactNumber,
CRM_TRN_ORDER.ORDER_PRICE,
CRM_TRN_ORDER.ORDER_CREATEDDATE
This returns the proper record, but I want the very last… I know I should use something like this…
SELECT TOP 1 *
FROM table_Name
ORDER BY unique_column DESC
Where I get lost, and if I am correct in saying so, you can only do one Select… so how do I integrate the two? Thanks in advance for your help.
What you are wanting is something like:
Note: I made up the JOIN clause, because I don’t know your schema. You should pick real columns that satisfy the join, assuming there is a foreign key relationship of some kind. Otherwise, you would simply be taking a cartesian product which is most likely NOT what you want. However, you could do that by replacing the FROM … JOIN clauses above with “FROM tbl_AcerPFSSurveyIVR, CRM_TRN_ORDER”.