A family of Microsoft relational database management systems designed for ease of use.
HA!!! You see with enough diet coke pumped in you -- you can figure it out. I needed to link the ID to the Pay Period. It works like a charm now.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have written a query to calculate if a person has used vacation within a certain pay period, this is identified with an ID. It worked beautifully -- now I am getting the arithmetic overflow error and have no idea why. Here is the query. This is Access 2007 ADP with SQL 2000
SELECT DISTINCT
dbo.March_Vac_Start.EMPLID, dbo.March_Vac_Start.NAME,
CASE WHEN LADOLFO.PAY_PERIOD_STARTING.ID = '7' THEN SUM(dbo.March_Vac_Start.CURRENT_VAC_BALANCE - COALESCE (dbo.Vacation_Used.Vacation_Used,
0)) ELSE dbo.March_Vac_Start.CURRENT_VAC_BALANCE END AS Vacation_Used_Apr15
FROM dbo.March_Vac_Start LEFT OUTER JOIN
LADOLFO.VACATIONHOURS1 INNER JOIN
LADOLFO.PAY_PERIOD_STARTING ON
LADOLFO.VACATIONHOURS1.PAY_PERIOD_STARTING = LADOLFO.PAY_PERIOD_STARTING.PAY_PERIOD_STARTING ON
dbo.March_Vac_Start.EMPLID = LADOLFO.VACATIONHOURS1.EMPLID LEFT OUTER JOIN
dbo.Vacation_Used ON dbo.March_Vac_Start.EMPLID = dbo.Vacation_Used.EMPLID
GROUP BY LADOLFO.PAY_PERIOD_STARTING.ID, dbo.March_Vac_Start.EMPLID, dbo.March_Vac_Start.NAME, dbo.March_Vac_Start.CURRENT_VAC_BALANCE
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
HA!!! You see with enough diet coke pumped in you -- you can figure it out. I needed to link the ID to the Pay Period. It works like a charm now.