Skip to content
Advertisement

Oracle Apex update specific row of table

Hi i want to update a specific row of my oracle database via apex. So i need to reach/address the specific row via where clause.

example entries:

GATTUNG ART UNTERART ABART VARIETÄT
AAA AAA AAA NULL NULL
AAA AAA NULL NULL AAA
AAA AAA NULL NULL NULL

Now i have two approaches.

first:

second:

the differences of both approaches are the P1_WHERE_...variables.

  1. the first one use for example :P1_UNTERART and contains the whole value
  2. the second one use for example &P1_WHERE_UNTERART. and contains = '&P1_UNTERART.' OR IS NULL

my problem is:

  1. the first one updates all entries if i only set GATTUNG and ART (if i do not specify one of the other variables)
  2. the second will work, but is not the right approach as I should be using binding variables instead of &VAR.

So my question is, how can i use the first approach which the desired result… 🙁

Advertisement

Answer

Does this do the trick ? It will update the rows if any of the columns have the same value as the corresponding page item or the database column and page item are both null:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement