Good Day,
I am currently having trouble with a select statement in SQL. I am trying to extract data from tables. The select statement returns multiple rows for the same record because there has been different individuals for this record. However I do want to see the latest individual row.
For Example Result Tab:
Row 1: 1 entry1 yes yes yes 20 50 Dawid
Row 2: 2 entry1 yes yes yes 20 50 Jan
Row 3: 3 entry1 yes yes yes 20 50 Charlie
Required Result Tab:
Row 3: 3 yes yes yes 20 50 Charlie
The only reference I have to use is the primary key unfortunately.
The ENT is for the entry table, the instance links to the workflow and from the instance to the current workflow progress. I need help to only return the latest 1 of all the results per entry. Is this possible?
I can not use a CTE or any variable declares, because I am going to generate a SQL Report which does not support it.
LEFT JOIN ENT_Instance ENTI ON ENT.entryID = ENTI.entryID
LEFT JOIN VW_Instance WFI ON ENTI.instanceID = WFI.instanceID
LEFT JOIN WF_Progress wfpg ON WFI.instanceID = wfpg.instanceID
Any assistance regarding this would be appreciated.