Hi,
I adapted what a few of you wrote as follows. However, Access won't let me save it - says there's a syntax error in the From clause. How can I correct it?
Thanks.
Select License, County, EPA_Reg, Brandname, Chem, Active, Pestcode
From
(
Select License, County, EPA_Reg, Brandname, Chem1 As Chem, Active1 As Active, Pestcode
From myTable
Where Active1 > 0
Union All
Select License, County, EPA_Reg, Brandname, Chem2, Active2, Pestcode
From myTable
Where Active2 > 0
Union All
Select License, County, EPA_Reg, Brandname, Chem3, Active3, Pestcode
From myTable
Where Active3 > 0
Union All
Select License, County, EPA_Reg, Brandname, Chem4, Active4, Pestcode
From myTable
Where Active4 > 0
)
I adapted what a few of you wrote as follows. However, Access won't let me save it - says there's a syntax error in the From clause. How can I correct it?
Thanks.
Select License, County, EPA_Reg, Brandname, Chem, Active, Pestcode
From
(
Select License, County, EPA_Reg, Brandname, Chem1 As Chem, Active1 As Active, Pestcode
From myTable
Where Active1 > 0
Union All
Select License, County, EPA_Reg, Brandname, Chem2, Active2, Pestcode
From myTable
Where Active2 > 0
Union All
Select License, County, EPA_Reg, Brandname, Chem3, Active3, Pestcode
From myTable
Where Active3 > 0
Union All
Select License, County, EPA_Reg, Brandname, Chem4, Active4, Pestcode
From myTable
Where Active4 > 0
)