You can sweat the solder into the hole and it will hold, as long as you clean your copper good and use a self tinning flux.
I would not normally suggest it for a main line where you have consistant flow, because it will eventually cause a hole in the pipe. But a toilet line is ok. Since the nail actually pushes the material into the pipe, as water flows by small vortexes are created (whirlpools). On a main line, they pick up debris and calcium from the water and act like a little grinder to eat away at the side of the pipe. Eventually it cuts a hole completely through the pipe. That is why, you are supose to debur your piping when you install it. The same thing happens at the end of a pipe, when you cut it, you are actually stretching the pipe till it breaks, creating a bur on the inside of the pipe. As the water passes, it swirls.
If you want to cut your copper, there is a tubing cutter purchased at Home Depot, that is round. It fits over the pipe and clamps onto the pipe. There are no nobs to turn to get in the way of its rotation. It is spring loaded, so as you rotate it, it cuts throught the pipe. A really handy tool. I also have a 4 bladed cutter, that you only need to turn 1/4 of a turn to cut all the way through the pipe. Ahh tools, I buy them like water.