The amide function formally arises from the condensation of a carboxylic acid with an amine. Accordingly, amides are prepared from reactive carboxylic acid derivatives (esters, anhydrides or acyl chlorides) and amines. However, there are some more methods...
Reaction of Amines with Acyl Chlorides, Anhydrides and Esters
One of the simplest ways of preparing an amide is the treatment of an ester, acyl chloride or anhydride with an amine in an inert solvent. The amide is usually very insoluble and precipitates quite pure.
The mechanism is the typical addition-elimination.
No need of acids or bases!
The conversion of a ketone into an oxime and its transformation into an amide are important processes carried out at the pharmaceutical industry to turn erythromycin into azithromycin, very potent antibiotics of wide spectrum.
The mechanism involves the rearrangement of a carbon towards nitrogen:
The trans carbon relative to the oxime's OH is the one that rearranges as shown in the following examples.