Hello world. Im new to Access and have done my best to teach my self however Ive hit a road block and need some help, so go easy on me as this is my first post here as well. Hopefully I can explain this well enough to get some direction. Some back ground is I audit Fiber optic test results, I have one table with upwards of 250K results in it.
Simply put I need to get a percentage of results from a given serial number on a given day.
I would like the final report to show date, S/N, and the percentage
Code for the main Query. This guys ultimately find what results are negative. As you see it checks 4 columns for a negative value only one needs to be negative to qualify. It pulls its information from the main table. I need to know the percentage of results a particular S/N tested that fit the criteria below.
Code:
SELECT
NegLoss.[OLTS Loss Value End1 WL1] AS [R>M 1310nm],
NegLoss.[OLTS Loss Value End2 WL1] AS [M>R 1310nm],
NegLoss.[OLTS Loss Value End1 WL2] AS [R>M 1550nm],
NegLoss.[OLTS Loss Value End2 WL2] AS [M>R 1550nm],
NegLoss.[Cable ID], NegLoss.[Overall Result],
NegLoss.Closet, NegLoss.Date,
NegLoss.[Main S/N]
FROM NegLoss
WHERE (
((NegLoss.[Cable ID]) Not Like "TRC*") AND (
((NegLoss.[OLTS Loss Value End1 WL1])<0) OR
((NegLoss.[OLTS Loss Value End2 WL1])<0) OR
((NegLoss.[OLTS Loss Value End2 WL2])<0) OR
((NegLoss.[OLTS Loss Value End1 WL2])<0)
))
ORDER BY NegLoss.[Cable ID];
I cant seem to figure out how to combine the two queries to give me a percentage. We have multiple serials per day. Not all days will have a neg loss event. Some results may have multiple events. Im not sure what other information you may need so let me know what I can do to help you out.