Pick SQL for appending in a cleaner way