Heteroarylpiperidin und -piperazinderivate der Formel (I),in welcher die Symbole A, X, Y, L1, L2, G, Q, p, R1, R2 und R10 die in der Beschreibung angegebenen Bedeutungen haben, sowie Salze, Metallkomplexe und N-Oxide der Verbindungen der Formel (I) und deren Verwendung zur Bekämpfung von pflanzenpathogenen Schadpilzen sowie Verfahren zur Herstellung von Verbindungen der Formel (I).Heteroarylpiperidine- and -piperazine derivatives (I) and their salts, metal complexes and N-oxides are new. Heteroarylpiperidine- and -piperazine derivatives of formula (I) and their salts, metal complexes and N-oxides are new. A : phenyl or optionally benzocondensed, 5- or 6-membered heteroaryl (both optionally substituted) L1 : NRL12 or C(RL11) 2 RL11 : e.g. H, halo, hydroxy, cyano, -C(=O)H or -C(=O)OH RL12 : e.g. H, -C(=O)H, (halo)alkyl, (halo)alkenyl, (halo)alkynyl or (halo)cycloalkyl Y1 : S or O X : C or N R2 : H, (halo)alkyl, alkenyl, alkoxy, halo, cyano or hydroxy R10 : oxo, (halo)alkyl, alkenyl, alkoxy, halo, cyano or hydroxy p : 0-2 G : 5-membered heteroaryl (optionally substituted) Q : optionally partially or completely unsaturated 5-membered heterocyclyl L2 : e.g. direct bond, O or C(=O) and R1 : e.g. 5-8 membered non-aryl (optionally partially saturated) carbocyclic ring, a 5-7 membered non-aryl heterocyclyl or a 8-11 membered carbocyclic or heterocyclic bicyclic ring (all optionally substituted). Full Definitions are given in the DEFINITIONS (Full Definitions) Field. Independent claims are included for heteroarylpiperidine- and -piperazine intermediates of formulae (VII) and (XVIIa). W6 : acetyl, 1-4C-alkoxycarbonyl, benzyl or benzyloxycarbonyl and W13 : leaving group. [Image] [Image] ACTIVITY : Fungicide Antifouling. The fungicidal activity of (I) against Phytophthora infestanswas tested in tomato. The results showed that 2-{3-[2-(1-{[3,5-bis(difluoromethyl)-1H-pyrazol-1-yl]acetyl}piperidin-4-yl)-1,3-thiazol-4-yl]-4,5-dihydro-1,2-oxazol-5-yl}benzaldehyde-O-methyloxime an act