I am wanting to know if there is a way to make this query a range.
This is the main component:
dd_user_wave_57_syn a, dd_user_log_wave_57 b
I have to change each time I want to refer to a new location, so for example
dd_user_wave_58_syn a, dd_user_log_wave_58 b -- then once done go to the next one
dd_user_wave_59_syn a, dd_user_log_wave_59 b -- and so on
See full SQL below, any advice on how to make it a range of wave numbers would be great instead of 1 by 1.
select a.tls_id, a.processed_user, a.action, a.comments, a.processed_date,
from dd_user_wave_57_syn a, dd_user_log_wave_57 b
a.trs = b.TRS
and a.processed_user = b.PROCESSED_USER
and action not like '%ss'
and a.processed_user in (select USERNAME from dwd_user where dwd_user.GROUPS = 'DAN')
and to_char(a.PROCESSED_DATE, 'MMYYYY') = '042019' ----- Change the month as per request e.g. 062018
order by processed_date desc