The present invention relates to a process for preparing a compound of the formulae (Ia) or (Ib), or a mixture thereof, wherein R1 and R2 independently of one another are hydrogen, C1-C10-alkyl, C1-C10-haloalkyl, C3-C10-cycloalkyl, C3-C10-halocycloalkyl, C2-C10-alkenyl, C2-C10-haloalkenyl or together represent an aliphatic chain, or the like A&minus is HSO4&minus or 1/2 SO42&minus the process comprising the reaction of a sulfide of formula SR1R2 with hydroxylamineO-sulfonic acid of formula wherein the reaction is carried out in an aqueous medium in the presence of a base. The present invention also relates to a process for preparing a compound of the formula (IV), wherein R3 is halogen, cyano, C1-C8-alkyl, C1-C8-haloalkyl, C3-C8-cycloalkyl, C3-C8-halocycloalkyl, C2-C8-alkenyl, C2-C8-haloalkenyl, C1-C8-alkoxy, phenyl, or the like R4 is hydrogen, C1-C10-alkyl, C1-C10-haloalkyl, C3-C8-cycloalkyl, C3-C8-halocycloalkyl, C2-C10-alkenyl, C2-C10-haloalkenyl, phenyl, or the like p is 0, 1, 2, 3 or 4 the process comprising: (i) providing the compound of the formulae (Ia) or (Ib), or a mixture thereof, (ii) reacting a compound of the formulae (Ia) or (Ib), or a mixture thereof, obtained in step (i) with a compound of the formula (V) in the presence of a base,