Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi , I would like to get data between '2015001' and '2015012' from data base,,, what would be the best way to write it in where clause.
As you see I am using MATCH statement, but I think it can be written in a better way
SQL
SELECT * FROM /BIC/AO2HIPLPA00 //$(vTable)
WHERE MATCH (FISCPER, '2015001','2015002','2015003','2015004','2015005','2015006','2015007','2015008','2015009','2015010','2015011','2015012') // $(Period) // 001/2015 012/2015
AND DISTR_CHAN = '99'
Replace the where statement with:
where FISCPER >= '2015001' and FISCPER <= '2015012' AND DISTR_CHAN = '99'
Try where FISCPER between '2015001' and '2015012'
I would like to include both ends so can it be FISCPER >= '2015001' and FISCPER <= '2015012'
Hi,
WHERE date >= '2015001' AND
date <= '2015012'
I preferred Gysbert approach.