Limit month to export report

Asked

Viewed 26 times

0

Good morning, everyone,

I have a system, and it exports the company’s YEAR report. I wanted to limit this report to 18 months. That is, the user can make a report of no more than 18 months, besides, they would have to contact the system administrator so that he could make the report more than 18 months.

The query I use in the database for dates is raw, it has only this: M.DTENCERRAMENTO = TO_DATE('01/01/1800 00:00:00','DD/MM/YYYY HH24:MI:SS') I’m new, I don’t know much about banking yet because I’m at the beginning of college. Could someone help me, how I can limit this date.

  • Use the date functions to set the reporting period. For example: BETWEEN ADD_MONTHS(M.DTCLOSURE, -18) AND M.DTENCERRAMENTO. You may also want to use TRUNC(sua_data, 'MONTH').

  • M.DTENCERRAMENTO BETWEEN TO_DATE('01/01/1800 00:00:00','DD/MM/YYYY HH24:MI:SS')
ADD_MONTHS(M.DTENCERRAMENTO, -18) AND M.DTENCERRAMENTO

  • It would look that way in case?

  • No. Your command is syntactically wrong. Perhaps the limitation of the amount of months should be in its application because maybe it is the one who knows who should or should not have a maximum limit of months.

  • I haven’t been able to solve it yet. Fought by the anonymous force.

  • I got people, fight.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.