Condensation of 3-pyridylacetonitrile (I) with dimethyl-formamide dimethylacetal (II) afforded dimethylaminomethylene compound (III), which was cyclized to isoxazole (IV) by treatment with hydroxylamine.HCl in AcOH at 100 C. Quaternization with iodomethane provided pyridinium salt (V), and subsequent reduction with NaBH4 in MeOH produced tetrahydropyridine (VI). Then, methylation with iodomethane in the presence of KOH gave a mixture of monomethylated (VII) and dimethylated (VIII) compounds, which were separated by column chromatography. Finally, the major methylamino compound (VII) was converted to the oxalate salt.