Oracle Apex Data Generator

30 Views Asked by At

Using Oracle Apex 22.2, I can't seem to work out some basic formula's using the oracle apex data generator. With no error handling, and very little documentation, I can't seem to figure out the correct syntax. Here are some examples of what I would like to achieve:

  1. Generate a truncated date between a start and end date. Make sure it's distinct so the date can only appear once in the data set.
  2. Use a case/if statement that uses the value of one column to determine the value of another column.
  3. Generate a date based off of another date contained in the same record (date 2 = date 1 + 1 day)

Any further documentation on how to make the actual formula and built in components work would be appreciated. Something as simple as trunc({createddate}) throws an error. All I can find so far has been vague and doesn't get into the details of syntax and data manipulation.

1

There are 1 best solutions below

1
Koen Lostrie On

For bullet point 1: I don't think that is possible, this is a row generator, you're asking for a functionality across rows. Bullet point 2 and 3. I'm not sure what syntaxes are allowed, the doc is indeed very basic. However you can create a pl/sql function and reference that so I'd go ahead and give that a try (this could be pretty buggy).

I would solve issue 1 with a custom script and 2/3 either by adding a virtual column to your table or a custom script too.