The sugar would dissolve in water. You could then pour off the solution and wash the remaining sand with a bit more water. Heat the water to evaporate it from the sugar, and the two are separated.
You can detect salt in water without tasting by measuring the density of the water. Place a glass of spring water and a glass of the suspected salt water on a balance scale and the heavier one contains salt. Other ways to test for salt in water is to put a drop of water on the end of a nail and place in a gas flame. If the water contains salt, the flame will turn a yellow/orange color.