I have the following union query
which produces a table with headers
Field Name / Field Code / Effect / Yr
At the moment I then query the table and GROUP on YR and SUM the effect.
Is it possible to code the 2nd query into the above so that I only have 1 query? If so can anyone help with the code?
Thank you in advance.
Code:
SELECT [Field Name],[Field Code], NYr0 as Effect, CInt([OM Application Year]) As Yr
FROM qry2rptA1
UNION ALL
SELECT[Field Name],[Field Code], NYr1,CINT([OM Application Year]+1)
FROM qry2rptA1
UNION ALL SELECT[Field Name],[Field Code],Nyr2, CINT([OM Application Year]+2)
FROM qry2rptA1;
which produces a table with headers
Field Name / Field Code / Effect / Yr
At the moment I then query the table and GROUP on YR and SUM the effect.
Is it possible to code the 2nd query into the above so that I only have 1 query? If so can anyone help with the code?
Thank you in advance.