Query Not Pulling Data for DAP

J

Jason Lopez

I have a series of queries that work properly inside Access. But for some
reason or another, they don't want to work with the Data Access Pages. Here
is what the queries look like, in sequence:

Query1
SELECT dbo_WorkflowHistory.WorkflowID, dbo_Workflow.WorkflowPhase,
dbo_WorkflowHistory.CreateDate, dbo_WorkflowHistory.WorkflowHistoryNote
FROM dbo_WorkflowHistory INNER JOIN dbo_Workflow ON
dbo_WorkflowHistory.WorkflowID = dbo_Workflow.WorkflowID
GROUP BY dbo_WorkflowHistory.WorkflowID, dbo_Workflow.WorkflowPhase,
dbo_WorkflowHistory.CreateDate, dbo_WorkflowHistory.WorkflowHistoryNote
HAVING (((dbo_Workflow.WorkflowPhase)="Finalize") AND
((dbo_WorkflowHistory.WorkflowHistoryNote) Like "Finalizer*" Or
(dbo_WorkflowHistory.WorkflowHistoryNote) Like "*Finalize phase."));

Query2
SELECT [Finalize Stuck-1].WorkflowID, Max([Finalize Stuck-1].CreateDate) AS
MaxOfCreateDate
FROM [Finalize Stuck-1]
GROUP BY [Finalize Stuck-1].WorkflowID;

Query3 (Final and basis of DAP)
SELECT [Finalize Stuck-2].WorkflowID, [Finalize Stuck-2].MaxOfCreateDate,
dbo_Workflow.Group, dbo_Workflow.ContentName,
Min(((DatePart("yyyy",Now())-DatePart("yyyy",[Finalize
Stuck-2].MaxOfCreateDate))*53*5)+((DatePart("ww",Now())-DatePart("ww",[Finalize
Stuck-2].MaxOfCreateDate))*5)+DatePart("w",Now())-DatePart("w",[Finalize
Stuck-2].MaxOfCreateDate)) AS BusDays
FROM [Finalize Stuck-2] LEFT JOIN dbo_Workflow ON [Finalize
Stuck-2].WorkflowID = dbo_Workflow.WorkflowID
GROUP BY [Finalize Stuck-2].WorkflowID, [Finalize Stuck-2].MaxOfCreateDate,
dbo_Workflow.Group, dbo_Workflow.ContentName
HAVING (((dbo_Workflow.Group)<>"PL" And (dbo_Workflow.Group)<>"GCP") AND
((Min(((DatePart("yyyy",Now())-DatePart("yyyy",[Finalize
Stuck-2].[MaxOfCreateDate]))*53*5)+((DatePart("ww",Now())-DatePart("ww",[Finalize
Stuck-2].[MaxOfCreateDate]))*5)+DatePart("w",Now())-DatePart("w",[Finalize
Stuck-2].[MaxOfCreateDate])))>2));


I have another DAP that uses queries similar to this one and it works just
fine. But, for some reason I can't get this one to work. Help? Ideas?
Possibilities?

Jason Lopez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top