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

Header redirect
Hello ive got a problem ive got form with its action set to itself.
Code: <form id="f

newbie question
Hi out thereIm totaly new in this forum and to .net and vb so here is a totaly newbie question.I wan

How to insert random unique values in 2 columns ?
I have table with 2 columns

Create Table code_for_code (
first_code varchar2(10) uni

generating random codes
Hi guys n gals,

I have a requirement to generate 250,000 unique codes...

These codes a

What's best way to get a user's Word doc converted to simple html and images?
Hi all,

I was just wondering if anybody has any experience of this.
Basically, I'm buildin

PHP onsubmit in the form not going to the fuction.
I have a form through ‘onsubmit’ calling a function validation(). But not going to the

SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself

Error Messaging not working
I changed the way my form tells the user of an error. But I can't seem to get it to work properly.

want to add a break after a certain amount of characters
i was wondering how to add a break in a blog post after a certain amount of characters... any idea o

Confused with Loop
guys, i got confused with Looping...this is the case

I have 3 stocks, let say "Stock A&q

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