changed update/insert queries with last_record and first_record from dec to string