An oxime is a compound with a C=N(OH) group in it.
Like with any amine, reacting hydroxylamine with a carboxylic acid would just result in the ammoium carboxylate salt.
Reacting this with an acid derivative such as an acid chloride or anhydride would produce an amide.
Hence, an oxime can only be produced from an aldehyde or ketone.