Can an extension cord be used to permanently power an outside sump pump?
Use of flexible cords and cables are covered in the NEC in Article 400. In this article 400.8 Uses not permitted 400.8 (1) As a substitute for a fixed wiring of a structure and 400.8 (5) Where concealed by walls, floors, or ceilings or located above suspended or drop ceilings. 

Flexible cords can be used as outlined in 400.7 (A) (6) and (7). Think of uses permitted as a "no longer than 6' rule" which is usually accepted by the AHJ.

So in short according to your question no. Also running electrical in and exposed to weather you have to worry about deterioration of the insulation. If that doesn't satisfy your question I would also like to point out that this is one of the major causes of electrocution in the US.