i have got problem with transfer 2 data function from oracle to postgresql can you help me:
Data:
INTERVALL = numeric(10,0)
START_DATE = timestamp without time zone
REPETITIONS = numeric(10,0)
This expression i copy from case state. I must write equivalent logical action in postgresql.
case when (extract(DAY FROM (START_DATE + TRUNC(INTERVALL*(REPETITIONS-1) * 7)))
- extract(DAY FROM CURRENT_TIMESTAMP)) >= 0 then 'OK'
and second:
case when (extract(DAY FROM add_months(START_DATE, TRUNC(INTERVALL*
REPETITIONS-1) * 12))) - extract(DAY FROM CURRENT_TIMESTAMP)) <= 0 then 'ok'