IBM DB2: Generate list of dates between two dates
问题 I need a query which will output a list of dates between two given dates. For example, if my start date is 23/02/2016 and end date is 02/03/2016, I am expecting the following output: Date ---- 23/02/2016 24/02/2016 25/02/2016 26/02/2016 27/02/2016 28/02/2016 29/02/2016 01/03/2016 02/03/2016 Also, I need the above using SQL only (without the use of 'WITH' statement or tables). Please help. 回答1: I am using ,ostly DB2 for iSeries, so I will give you an SQL only solution that works on it.