Varible in trigger - refering to correct schema


Posted on 16th Feb 2014 07:03 pm by admin

Hello

Im having some issues with my trigger.
What I want to do is call opon a different schema - depending on which data the triggers picks up.

For example, lets say, triggers picks up CUSTOMER_ID & MARKET_CODE
CUSTOMER_ID = 20
MARKET_CODE = IT

then I want call a PLSQL package in that is in a schema called CORE_IT. What I tried is using varibles with define, and concat, but I cannot get it to work.

CREATE OR REPLACE TRIGGER AFTER_801
after insert on market_table
referencing new as new old as old
for each row
declare
v_marketcode varchar2(2) := :new.market_code;
begin
CORE_||v_market_code||.Execute_package();
end;
Iv also tried

..
define MK := :new.MARKET_ID
CORE_&MK.Execute_package();
..
I hope you get my picture, any ideas on how to get this to work?

No comments posted yet

Your Answer:

Login to answer
197 Like 21 Dislike
Previous forums Next forums
Other forums

user validation always displaying invalid ? please help
Hello,

I have 2 accounts and there is a field in mysql called validated it can be either &quo

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

New to PHP and just trying to understand a little code.
I hope I'm not annoying anyone or breaking the rules but I was wondering about this bit of code righ

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

convert static html data into dynamic
hi all

i need to convert a website which has static above 2000 articles into dynamic and add

Retrieving Data from Two Different Databases
Hello All,

Ran into another problem and would appreciate some help! I have two datab

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

[RESOLVED] Socket/Port remains open after app crashes
I'm having this problem with a networked app in vb.net.

If the program exits normally the por

MYSQL gen help
This is my Mysql gen. can anyone tell me why this echos

MID(networkset.networkid, 3, 3) AS &q

Open link with largest int string first
I have the following links i would like to open either all at once or one-by-one. How would i procee

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash