I have a query that whose results will eventually be exported to Excel.
One of the fields in the Integration table is called Density Type. It is either blank (null) or has a value of "Exclude".
As it stands, the query is correct but the SV value for any of the records with a DensityType of "Exclude" needs to be calculated as zero, regardless of the value of VoltsRms. Simply excluding those records will not work.
Is there a way to do this in a query or would I need to do something with VBA coding? It needs to be simple as this query will be imported into a selection of databases for analysis.
Code:
SELECT Integration.*,
Integration!NumberSamples/(Sequence!IntegratedPings*16) AS [% Proc],
((Integration!VoltsRms)^2)*SelectAequip!Aequip AS SV,
SelectAequip.Aequip,
Sequence.File,
Sequence.StartTime,
Sequence.EndTime
FROM SelectAequip, Integration INNER JOIN (Configuration INNER JOIN Sequence ON Configuration.TableIndex=Sequence.SeqID) ON Integration.AbsSeq=Sequence.AbsSeq;
One of the fields in the Integration table is called Density Type. It is either blank (null) or has a value of "Exclude".
As it stands, the query is correct but the SV value for any of the records with a DensityType of "Exclude" needs to be calculated as zero, regardless of the value of VoltsRms. Simply excluding those records will not work.
Is there a way to do this in a query or would I need to do something with VBA coding? It needs to be simple as this query will be imported into a selection of databases for analysis.