Wiring different gauge wires (18 awg to 14 awg)
I recently bought a house that has a nice wall lamp in the living room that I would like to keep as I renovate it. The lamp came wired with 18 awg wire (1 neutral, 1 hot, and 1 ground). The previous owner wired the lamp to a standard wire with a plug to make it a plug-in fixture. I don't know if this lamp was manufactured as a plug-in fixture, but I would like to hide the wires inside the wall. What I'm thinking about doing is to pull a wire from a receptacle, which is on 14/2 wiring on a 15 amp circuit. Then I will run the 14/2 wire to a single pole switch and from the swith, I'm planning to run the 14/2 wire to the 18 gauge wire on the wall lamp. My question is: Can I wire an 18 awg wire with a 14 awg wire? Will this be to code or will it be a fire hazard? I will appreciate your advice.
Thanks,
Ceomat