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

How to load mysql (and other) extensions into PHP
How to load mysql (and other) extensions into PHP PHP Development forum discussing coding practices,

Procedure with variable number of columns
Hi, I have a procedure that looks like this:

PROCEDURE PROC(p_cursor OUT sys_refcurso

Create or replace package is ending ORA-21700
Database 9.2.0., patch 8 (9.2.0.8.0).
I trying run
create or replace package ....etc.

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

ORA-01017: invalid username/password; logon denied
Dear All,

I am facing problem in taken backup from db13 it comes up with the following l

Transform value 0 in no and 1 in yes help needed
Hello,
I have this in the table: "value" type int 0 to represent false and 1 to represe

how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.
If a feed takes long than

Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.

Code: $moderators = array('Admin', 'ba

start new row of pictures
on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get

Remove Rows From Database ad
Hi All,

I have this:

Code: [Select]<?php
session_start();
include('../com

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