plsql - Oracle APEX validate Input during Data Load with Transformation Rule -


in apex, when performing data load (e.g. upload of csv file apex application), possible validate input data using transformation rule?

for example, suppose upload data cars have been sold month. target table has column car_manufacturer , num_car_sold.

the column car_manufacturer must accept 3 values, ('a1', 'a2', 'a3'). in pseudo plsql, give idea:

if :car_manufacturer in ('a1, a2, a3') :car_manufacturer else <error> 

how can check in upload phase? possible use transformation rule, in order if fails, returns error message? other ways?

thanks in advance.

you put constraint on table definition per other answer, or if want error message when data load used, can use table lookup.

  1. go shared components -> data load definitions
  2. open data load definition want edit
  3. create table lookup
  4. select column (e.g. car_manufacturer)
  5. set table lookup attributes table contains list of valid values (you'll need either table or view this)
  6. leave insert new value set no (if set 'no' (the default) new record not created in lookup table if lookup column value(s) entered not exist. if set 'yes' record created in lookup table using upload column(s) , upload key column retrieved newly created record.)
  7. set error message message want return if match not found.

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -