Trying to isolate specific entries from a table based on Production Code:
(Select (P.EntryDate) From Production P
Full JOIN ProductionJobNumber PJ
on P.Code = PJ.ProductionCode
Where P.ProcessCode = 1080 and PJ.JobNumber = OH.JobNumber) as OkToPlate,
(Select (P.EntryDate) From Production P
FULL JOIN ProductionJobNumber PJ
on P.Code = PJ.ProductionCode
Where P.ProcessCode = 100 and PJ.JobNumber = OH.JobNumber) as DoneRack,
(Select (P.EntryDate) From Production P
FULL JOIN ProductionJobNumber PJ
on P.Code = PJ.ProductionCode
Where P.ProcessCode = 1010 and PJ.JobNumber = OH.JobNumber) as JobStart
Getting inconsistent results
This is for history of job. Would like this to be in row to export to Excel for end users.
Without MIN or MAX
Software/Hardware used:
MS SQL 2005
ASKED:
August 13, 2012 8:12 PM
What exactly do you mean by “inconsistent results” ?You might want to post some example data, along with the results you would want to get from that data, to make sure everybody understands what you are trying to accomplish.Keep in mind that we don’t know your table’s structure. The more details you provide, the more chances to get useful responses.