Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Create a transformation rule in Data Loading ...

bondursApr 10 2014 — edited May 17 2014

Greetings:

When create a transformation rule, what is the syntax you use when the rule type is a PL/SQL Function Body or a SQL Query?  I can't seem to find any documentation or examples of this.

When I choose PL/SQL Function Body, and put the following code in:

begin

  return substr(staging_column,1,10);

end;

The transformation rules always fails.  Any help would be appreciated.

We are using APEX 4.2.1.00.08

Thanks,

Stan

Comments

Patrick M-Oracle May 16 2014

Hi Bondurs,

I am assuming staging_column is the column you are trying to apply your transformation rule. All you have to do, is :COLUMN_NAME anywhere you are trying to use any column value in your plsql function or expression.

in your case :

begin

   return substr(:staging_column,1,10);

end;

Regards,

Patrick

gerhard2001 May 16 2014

Hi bondurs!

A Function Body works normaly in this way:

if you select a database value

declare

v_value number;    -- or any other declaration

begin

select column_name

into v_value

from table_name

where ....;

return v_value;

end;

if you select a page item

declare

v_value number;    -- or any other declaration

begin

v_value := :page_item;

return v_value;

end;

Than you could substitute 'return v_value' by 'substr(staging_column,1,10)'

Gerhard

GhanaApexDeveloper May 17 2014

HI,

i suggest u look up apex processes and validation. http://www.talkapex.com/2012/03/how-apex-processes-various-conditions.html

THanks

Benjamin.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 14 2014
Added on Apr 10 2014
3 comments
4,431 views