I have a long wall flower bed made of brick. I was hoping to take a small section of that to convert into a sand box for my little. Any suggestion on how to separate the soil from the sand? Should I completely dig down to the bottom and remove all soil before adding a liner? It's connected to a bench on the end so I was hoping to use the end closest to the bench so my 2-year old has a seating area while playing.
Landscape fabric is sold at hardware stores, and is designed exactly for this purpose: let water through, but prevent the sand (or aggregate, whatever) from mixing with the soil.
The main concern with outdoor sandboxes is animals, especially cats, defecating in the sand. Cats carry some nasty parasites. Whatever you do, make sure to add a wooden lid that you can put it place after your kid is done playing. These lids are very common in European backyards, again, because of cats.
If you have hard clay underneath there's probably not much point in excavating to install a divider. If you have rich organic soil, that can quickly mess up nice play sand if disturbed. You mostly want to prevent digging through into it.
Two common solutions are treated plywood* and heavy fabric. Plywood can be 3/8" or 1/2" thick and should have drain holes drilled on a grid. Fabric must be tough enough to withstand sharp things like shovels and sticks, and they must be permeable or you'll have stinky sludge. Common tarps and landscape fabric won't do well. Look for something like a heavy driveway fabric or water-tolerant canvas.
* Warnings about using treated plywood in areas where children play are sometimes overblown in the name of litigation prevention. Unless you expect your kid to eat a substantial amount of the sand resting on such a product, it's not really a concern in my opinion.