0

I need to create a Cognos report, the SQL query has data for last 3 months. I want 3 different report pages for each month. I have data items as date_insert which is datetimestamp field. I want all the dates with Jan month on page 1, Feb on page 2, and March on page 3. I have created data items with month and year with date_insert, and then applied page set on it, but it is not showing correct results. Please suggest.

sorak
  • 2,607
  • 2
  • 16
  • 24
Ila
  • 9
  • 2
  • 1
    Please provide the test data you have defined, your code so far, the actual output, and your desired output. I expect that we can help you if you provide this. – sorak Mar 22 '18 at 06:54
  • select a , hours(al1.Dateinsert) from table al1 WHERE (DATE(AL1.DTINSERT) >= (current_date - (day(current_date)-1) days - 2 month) AND DATE(AL1.DTINSERT) <= current_date - day(current_date)days). – Ila Mar 22 '18 at 07:03
  • 1
    Edit your question to include extra information, please. – sorak Mar 22 '18 at 07:04

0 Answers0