insert with select check