fill records variable with query results