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

Multiple server callbacks (NOT POSTBACKS)
Hello, I have 2 different javascript client side functions that are on timers. When the timers elap

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou

Quick Syntax Question
Hi folks,

I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b

Simple Scraper... Weird Output
Okay, maybe I just need a Blue Monster and some sleep, but....

I'm scraping a ringtone site

Company Code for Vendors created through Business Partners
Hi, experts!

I'm trying to set up the integration between Business Partner (BP) and Vendo

Preserving user-entered linebreaks
Hi, I'm building a web 2.0 thingy from scratch and I wanna display text which users input. It's all

upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as

Calander layout
Hi i know this sounds like a simple question but i cant find the answer to it anywhere i have added

Add_Months not Easy to Understand
Oracle is number 1, very fast and very easy. But....
OK, I think but have a problem, only 1 pro

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