update function sqSearch