aaronlglover
Technical User
I am using toad to query an MDB. When I try to run the below query I get a "Microsoft Access ODBC too few parameters expected 1" error. Anyone have any thoughts?
Thanks
SELECT DISTINCT agtdata5.AGENT_ID, agentA.AGENT_NAME, agentmap2.HIRE_DATE, agtdata5.MU_ID, agtdata5.AGENT_DATA_VALUE, IIf(SchedulesA.STATUS='A','Yes','No') AS 'Attended'
FROM
(select agent3.agent_id, dateserial(mid(agent3.AGENT_DATA_VALUE,2,2),mid(agent3.agent_data_value,4,2),mid(agent3.agent_data_value,6,2)) FROM `\\Wfmid-1350\database$\IEX`.agtdata AS agent3 where agent3.agent_data_id = 2) agentmap2
RIGHT JOIN ((SELECT agent4.AGENT_ID, agent4.AGENT_NAME, Max(agent4.MODIFY_DATE_TIME) AS 'MaxOfMODIFY_DATE_TIME'
FROM `\\Wfmid-1350\database$\IEX`.agent agent4
GROUP BY agent4.AGENT_ID, agent4.AGENT_NAME) AgentA RIGHT JOIN (agtdata as agtdata5 LEFT JOIN (SELECT DISTINCT Schedules.AGENT_ID, Schedules.DETAIL_EXCEPTION, Schedules.STATUS
FROM `\\Wfmid-1350\database$\IEX`.Schedules Schedules
WHERE ((Schedules.DETAIL_EXCEPTION)='VZWTSS-ACSSBill-MiFi')) SchedulesA
ON agtdata5.AGENT_ID = SchedulesA.AGENT_ID) ON agentA.AGENT_ID = agtdata5.AGENT_ID) ON agentmap2.AGENT_ID = agtdata5.AGENT_ID
WHERE (((agtdata5.MU_ID)=1113) AND ((agtdata5.AGENT_DATA_ID)=1))
Thanks
SELECT DISTINCT agtdata5.AGENT_ID, agentA.AGENT_NAME, agentmap2.HIRE_DATE, agtdata5.MU_ID, agtdata5.AGENT_DATA_VALUE, IIf(SchedulesA.STATUS='A','Yes','No') AS 'Attended'
FROM
(select agent3.agent_id, dateserial(mid(agent3.AGENT_DATA_VALUE,2,2),mid(agent3.agent_data_value,4,2),mid(agent3.agent_data_value,6,2)) FROM `\\Wfmid-1350\database$\IEX`.agtdata AS agent3 where agent3.agent_data_id = 2) agentmap2
RIGHT JOIN ((SELECT agent4.AGENT_ID, agent4.AGENT_NAME, Max(agent4.MODIFY_DATE_TIME) AS 'MaxOfMODIFY_DATE_TIME'
FROM `\\Wfmid-1350\database$\IEX`.agent agent4
GROUP BY agent4.AGENT_ID, agent4.AGENT_NAME) AgentA RIGHT JOIN (agtdata as agtdata5 LEFT JOIN (SELECT DISTINCT Schedules.AGENT_ID, Schedules.DETAIL_EXCEPTION, Schedules.STATUS
FROM `\\Wfmid-1350\database$\IEX`.Schedules Schedules
WHERE ((Schedules.DETAIL_EXCEPTION)='VZWTSS-ACSSBill-MiFi')) SchedulesA
ON agtdata5.AGENT_ID = SchedulesA.AGENT_ID) ON agentA.AGENT_ID = agtdata5.AGENT_ID) ON agentmap2.AGENT_ID = agtdata5.AGENT_ID
WHERE (((agtdata5.MU_ID)=1113) AND ((agtdata5.AGENT_DATA_ID)=1))