I tried to save this query (qGOLOM, for those who have tuned in before) but it didn't like my From statement. What is incorrect or missing? Also, does the rest of it look acceptable? Thanks for any help!
Select License, County, EPA_Reg, Brandname, Chem, Active, Pestcode
From
(
Select County, EPA_Reg, Brandname, Chem1[As Chem], Active1[As Active], Pestcode
From myTable
Where Active1 > 0
Union All
Select County, EPA_Reg, Brandname, Chem2[As Chem], Active2[As Active], Pestcode
From myTable
Where Active1 > 0
Union All
Select County, EPA_Reg, Brandname, Chem3[As Chem], Active3[As Active], Pestcode
From myTable
Where Active1 > 0
Union All
Select County, EPA_Reg, Brandname, Chem4[As Chem], Active4[As Active], Pestcode
From myTable
Where Active1 > 0
)
Select License, County, EPA_Reg, Brandname, Chem, Active, Pestcode
From
(
Select County, EPA_Reg, Brandname, Chem1[As Chem], Active1[As Active], Pestcode
From myTable
Where Active1 > 0
Union All
Select County, EPA_Reg, Brandname, Chem2[As Chem], Active2[As Active], Pestcode
From myTable
Where Active1 > 0
Union All
Select County, EPA_Reg, Brandname, Chem3[As Chem], Active3[As Active], Pestcode
From myTable
Where Active1 > 0
Union All
Select County, EPA_Reg, Brandname, Chem4[As Chem], Active4[As Active], Pestcode
From myTable
Where Active1 > 0
)