sql set multiple variables from select