Hello,
It doesn't look like an error, it's more likely a warning. You don't have a index with date_r in ztable, create the index with this field to correct the problem, also avoid using select ~ end-select, try to use select <fields> into table <internal_table>.