A method in which a pyridinium derivative such as 1,3-dimethyl-2,3-dihydro-2-oxopyrimidinium chloride is reacted with an acetyl compound such as 4-acetylpyridine, and then the reaction product is reacted with ammonia or an ammonium salt.