change to get records sql