Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT IIf(IsNull([Production]![Product_Title]) Or [Production]![Product_Title] Like "Process*","Not Started","Started")
- AS Status, Max(Travel.Date) AS MaxOfDate, Person.ID, Person.LastName, Person.FirstName, Person.MiddleName,
- Person.Date, Person.Place, Person.Type, Production.Product_Title, Production.Publish_Date
- FROM (Person LEFT JOIN Production ON Person.ID = Production.ID) INNER JOIN Travel ON Person.ID = Travel.ID
- GROUP BY IIf(IsNull([Production]![Product_Title]) Or [Production]![Product_Title] Like "Process*","Not Started",
- "Started"), Person.ID, Person.LastName, Person.FirstName, Person.MiddleName, Person.Date, Person.Place,
- Person.Type, Production.Product_Title, Production.Publish_Date
- HAVING (((IIf(IsNull(Production!Product_Title) Or Production!Product_Title Like "Process*","Not Started",
- "Started"))="Not Started") And ((Person.Type) Is Not Null))
- ORDER BY IIf(IsNull([Production]![Product_Title]) Or [Production]![Product_Title] Like "Process*","Not Started",
- "Started"), Max(Travel.Date), Person.Type;
- SELECT p."Product_Title" as Status, max(t."Date") as MaxOfDate, i."ID", i."LastName", i."FirstName",
- i."MiddleName", i."Date", i."Place", i."Type", p."Product_Title", p."Publish_Date"
- FROM (x."Person" i left join x."Production" p on i."ID" = p."ID") inner join x."Travel" t on i."ID" = t."ID"
- WHERE p."Product_Title" LIKE '%Process%' OR p."Product_Title" LIKE '%Not Started%' OR p."Product_Title" LIKE '%Started%'
- OR p."Product_Title" isnull
- GROUP BY p."Product_Title" LIKE '%Process%' OR p."Product_Title" LIKE '%Not Started%' OR p."Product_Title" LIKE '%Started%'
- OR p."Product_Title" isnull, i."FIN", i."LastName", i."FirstName", i."MiddleName", i."Date", i."Place",
- i."Type", p."Product_Title", p."Publish_Date"
- HAVING CASE WHEN (p."Product_Title" LIKE '%Process%' OR p."Product_Title" LIKE '%Not Started%' OR p."Product_Title" LIKE '%Started%'
- OR p."Product_Title" isnull) THEN "Not Started" ELSE i."Type" IS NOT NULL END
- ORDER BY p."Product_Title" LIKE '%Process%' OR p."Product_Title" LIKE '%Not Started%' OR p."Product_Title" LIKE '%Started%'
- OR p."Product_Title" isnull;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement