move sql to sql