I am having a little trouble with some sub queries, being new to this what I am trying to do is to select the first status of a job where its status code = ‘q’, its log number and date the job was logged in the first status.
Then I want to select another status =’p’ its log number and logged date so I can compare the date difference in my report to see if the status p was reached from in 28 days, also
This info all comes from the same table and job enquiry number, wat happens is that each time the status is updated and changed.
I have been going down the lines of this code but as its borrowed from another report which did similar things but told me the next status (+1) rather than when the next status hit P.
Here’s my code I am working with so far….am I going down the right lines?