Hi
i
have requirment i need to extrct the data between two dates'
STARTING DATE and Ending DATE in the like between months and between year
eg:
starting
date DT_DA = 20131003 (yyyymmdd) => use 10 month
ending
date DT_A = 20140401 (yyyymmdd) => use 04 month
so, the program should consider the
months 10-11-12-01-02-03-04
- in ZESE we need to access
with the year range (YYYYmmdd)
contained in the DT_DA and DT_A
es:
starting
date DT_DA = 20131003 (yyyymmdd) => use 2013 year
ending
date DT_A = 20140401 (yyyymmdd) => use 2014 year
so, the program should consider the
years 2013-2014
so plse find below the select shouldbe structured in this way:
SELECT * FROM zrmm_076
WHERE zcodleg = 2_v_zcodleg
AND zper =
(month range of DT_DA/DT_A)
AND zese = (year
range of DT_DA/DT_A)
AND causmov IN
s_caus
AND datvis_ent BETWEEN starting
data
AND ending date
AND zmovdoppi = space.