A help on triggers
Hi all,
I have a doubt with triggers. my synario is, I have to make 2 insets and a select(one after the other continuously). One of the two insert statements will fire a Trigger(AFTER INSERT Trigger) and do some manipulations on data.After this I use the slect statement to reterive values from the table. In this case, The Insert query which is associated is taking nearly 40 seconds.(while others take only 2 to 3 seconds). I have also used setQueryTimeout() in this query as 10 seconds. But it is not throwing SQLException also. Can anybody suggest why this occurs:.is this because,the trigger takes much time to execute and hence the query timeout doesn't affect the flow.I had given a part of my code here:
Statement stmt=dbConn.createStatement();
stmt.setQueryTimeout(10);
int i=stmt.executeUpdate(detIns);//without trigger
int j=stmt.executeUpdate(HeadIns);//with Trigger ::Takes 40s
stmt.close();
Maybe you're not performing a commit in the stored procedure, so that the table is locked for a little while.......
Ps. if you can, you should be using PreparedStatements instead of Statements.
regards,
Owen
Similar Messages
-
Need help On Triggers/Change pointers in SAP
Hi Experts,
I Need help On Triggers/Change pointers in SAP.
I have a requirement as soon as an entry is created in one of the Standard SAP table it should check against my Ztable and update and create the corresponding entry in another Ztable.
Can some one help me out on this with the syntax and how to do itHi,
Check whether you have any enhancement option (BADI, user exit, Customer enhancement etc) in the program which is used to save the data in the SAP standard table. If so, then try to write your code in that appropriate enhancement. -
Hi All,
i have a few triggers that I need your help with.
The first trigger (below) is fired when an update is made to a column in an invoices table.
The question I have is to do with the exception section.
I want to change the status of the invoice if it fails to F.
This trigger has already complied fine but I have no test data yet to test against.
I was unsure of the mutating effect and was wondering if the exception section will cause it to mutate since it is trying to update the status of the current invoice being processed. Pls see below
create or replace
TRIGGER POP_STAGE AFTER
UPDATE OF "EXCHANGED_DATE" ON "INVOICES" FOR EACH ROW
declare
-- check if the invoice.mco_transfer_status has been updated to R
-- if it has then insert records into the relevant tables
-- Start the Insert based on the update of invoices.mco_transfer_status
ecode varchar2(100);
thisproc CONSTANT VARCHAR2(80) := 'trap_errmesg for transfer_status';
v_value varchar2(150);
BEGIN
-- do updates based on update of invoices.transfer_status column
IF :NEW.TRANSFER_STATUS='R'
THEN
-- Insert into E_TICKET_STAGE
INSERT INTO E_TICKET_STAGE (emco_document_number,exchanged_date,pax_seq,pax_forename,pax_surname,pax_type)
select :NEW.EMCO_DOCUMENT_NUMBER, :NEW.EXCHANGED_DATE,PX.PAX_SEQ,PX.FORENAME,PX.SURNAME,PX.PAX_TYPE
FROM PAX PX WHERE PX.BOOKING_ID=:NEW.BOOKING_ID;
-- Insert into SECTOR_STAGE table
INSERT INTO SECTOR_STAGE (emco_document_number,ps_id,sector_seq,pax_seq,fare_class,fare_basis,net_fare,tax,gross_fare,
flight_number,departure_date,dep_airport_code,dest_airport_code)
SELECT :NEW.EMCO_DOCUMENT_NUMBER, PS.PS_ID,PS.SECTOR_SEQ,PS.PAX_SEQ,PS.FARE_CLASS,PS.FARE_BASIS,PS.NET_FARE,PS.TAX,PS.GROSS_FARE,BS.FLIGHT_NUMBER,BS.DEPARTURE_DATE,
BS.DEP_AIRPORT_CODE,BS.DEST_AIRPORT_CODE
FROM PAX_SECTORS PS, BOOKING_SECTORS BS
WHERE PS.BOOKING_ID=:NEW.BOOKING_ID
AND BS.BOOKING_ID=PS.BOOKING_ID;
-- Insert into TAX_STAGE table
INSERT INTO TAX_STAGE (emco_docUment_number,PS_ID,TAX_SEQ,TAX_CODE,VALUE)
SELECT :NEW.EMCO_DOCUMENT_NUMBER, pt.PS_ID,TAX_SEQ,TAX_CODE,VALUE
FROM PAX_TAX pt,PAX_SECTORS ps
WHERE ps.BOOKING_ID=:OLD.booking_id and pt.PS_ID=ps.PS_ID;
-- Insert into CHARGES_STAGE table
insert into CHARGES_STAGE (emco_document_number,CHARGE_TYPE,CHARGE_AMOUNT)
select :NEW.EMCO_DOCUMENT_NUMBER, CHARGE_TYPE,VALUE FROM INVOICE_DETAILS IND
WHERE :NEW.INVOICE_ID=IND.INVOICE_ID;
END IF;
EXCEPTION
WHEN OTHERS THEN
ecode := SQLCODE|| ' '||sqlerrm ;
dbms_output.put_line(thisproc || ' - ' || ecode);
v_value := thisproc || ' - ' || ecode;
-- Insert into DOCUMENT_STATUS_STAGE ANY ERRORS DURING PROCESSING
insert into DOCUMENT_STATUS_STAGE (EMCO_DOCUMENT_NUMBER, STATUS,STATUS_DATE)
VALUES (:NEW.EMCO_DOCUMENT_NUMBER,v_value,sysdate);
update invoices set TRANSFER_STATUS='F' where invoice_id=:old.invoice_id;
END pop_stage;
The second trigger (also below) does a check on the payments table to see if the payment_complete date has been set.
If this has been set then we want to sum all the payments (based on invoice_id). once this sum has been made we want to compare this value to the value of the gross amount on the invoices table for that invoice. if they match (which shows the invoce has been fully paid) then we want to update the paid_date and set to sysdate.
create or replace
TRIGGER CHECK_INVOICE_STATUS AFTER
UPDATE OF "PAYMENT_COMPLETE" ON "PAYMENTS" FOR EACH ROW
declare
-- check if all the payments for that invoice have been received (completed)
-- if they are complete then sum all the payments for that invoice and compare to gross value on invoices
v_invoice_amount number;
v_gross_amount number;
thisproc CONSTANT VARCHAR2(80) := 'trap_errmesg for mco_transfer_status';
v_value varchar2(150);
BEGIN
IF :NEW.PAYMENT_COMPLETE is not null
THEN
-- We will sum all the payments for that invoice that have a value in payment_complete
select sum(amount) into v_invoice_amount from payments where payment_complete is not null
group by :OLD.INVOICE_ID;
-- We will also get the gross amount for the invoice to compare to the sum of the payments
select gross into v_gross_amount from invoices where
:OLD.INVOICE_ID = invoice_id;
END IF;
IF v_invoice_amount = v_gross_amount
then
update invoices set paid_date=sysdate;
end if;
end CHECK_INVOICE_STATUS;
Is this trigger sufficent?
Any tips will be appreciate.
ThanksI didn't really look into your post (rather long) ... anyway, I have 2 words for you "stored procedures".
-
Newbie needs some simple help on triggers
Hi there. I need to create a trigger and am very new to this language and would love some help.
I have tables STUDENT, BOOKS, BORROWING.
When a student borrows a book, a composite entry is created in the BORROWING table. In the Books table, their is an attribute 'Borrowed' with a Y or N.
When a new record with the same Title as a book is created in borrowing, the value of 'borrowed' needs to be set to Y. So far I have the following, but forgot that I need to insert a WHERE clause so that it doesnt update every book, but only the book that causes the trigger.
I am having trouble with this- how would i go about doing this? Any help appreacited...
CREATE OR REPLACE TRIGGER book_returned_trigger
AFTER DELETE ON borrowing
FOR EACH ROW
BEGIN
UPDATE books
SET
borrowed= 'N';
END;Hi guys. Am really having some trouble now. Funny thing is I had it working!
I have the following tables:
>
CREATE TABLE STUDENT
studentID VARCHAR2(8) NOT NULL,
firstname VARCHAR2(20) NOT NULL,
lastname VARCHAR2(20) NOT NULL,
gender VARCHAR2(10),
dob DATE,
address VARCHAR2(20),
suburb VARCHAR2(20),
phone VARCHAR2(8),
PRIMARY KEY(studentID)
CREATE TABLE BOOKS
title VARCHAR2(20) NOT NULL,
publisher VARCHAR2(20),
year DATE,
borrowed CHAR(1) CHECK (borrowed IN ('Y','N')),
PRIMARY KEY(title)
CREATE TABLE BORROWING
studentID VARCHAR2(8) NOT NULL,
title VARCHAR2(20) NOT NULL,
PRIMARY KEY(studentID,title),
FOREIGN KEY(studentID) REFERENCES student(studentID),
FOREIGN KEY(title) REFERENCES books(title)
>
My Triggers look like this:
>
CREATE OR REPLACE TRIGGER book_borrowed_trigger
AFTER INSERT ON borrowing
FOR EACH ROW
BEGIN
UPDATE books
SET
borrowed= 'Y' WHERE title = :OLD.title;
END;
CREATE OR REPLACE TRIGGER book_returned_trigger
AFTER DELETE ON borrowing
FOR EACH ROW
BEGIN
UPDATE books
SET
borrowed= 'N' WHERE title = :OLD.title;
END;
>
and some sample date:
>
INSERT INTO student (studentID, firstname,
lastname, gender, dob, address, suburb, phone)
VALUES ('34025492','Sally','Field','Female',
'26/FEB/1970','123 Latrobe Pde','Dromana','59812553');
INSERT INTO student (studentID, firstname,
lastname, gender, dob, address, suburb, phone)
VALUES ('98503345','Ray','Blackburn','Female',
'9/NOV/1954','52 Murawa Dve','Sorrento','59812433');
INSERT INTO books (title, publisher, year, borrowed)
VALUES ('Harry Potter','Roundhouse','1998','N');
INSERT INTO books (title, publisher, year, borrowed)
VALUES ('Twilight','Jones Books','2000','N');
INSERT INTO borrowing (studentID, title)
VALUES ('20737785','Harry Potter');
>
Now I cant get this trigger to change the value of the 'borrowed' column in 'BOOKS' to Y when I create a new record in the BORROWING table that references one of the Books.
Any idea why? I cant see why! Thanks for the help so far guys
Edited by: lockmac on Apr 1, 2009 12:40 AM -
Need urgent HELP in Triggers in PL/SQL
Hi all,
I am a noob in the db... i just started studying the PL/SQL.
i need ans to the below problem .. PLZ HELP
I had a table named employee with e_name,e_no,skill and payrate..
i need a trigger for the following
Updation is possible on the employee table if payrate is greater than the existing payrate and skill = ‘Chef’
I tried to write like this
Create OR Replace Trigger updateEmployee
INSTEAD OF UPDATE ON employee
FOR EACH ROW
WHEN ( skill = 'Chef')
BEGIN
NULL;
END;
but its showin the error tht when condintion cant be used with INSTEAD OF ...
Is their any other way i can create a trigger for this
PLZ HELP
THX IN ADVANCEINSTEAD OF triggers are valid for DML events on views.
Create OR Replace Trigger updateEmployee
BEFORE UPDATE OF payrate ON employee
FOR EACH ROW
BEGIN
IF :OLD.skill = 'Chef' AND :NEW.payrate < :OLD.payrate THEN
:NEW.payrate := :OLD.payrate;
END IF;
END updateEmployee;
Thanks -
Help on triggers needed-update other tables
Hi,
I am using 10g and is very new to triggers and I hope I can gain some advises here.
I have the following 3 tables. MainInterfaceTable is a table where it stores records of values which are to be updated to tables: log1 and log2 respectively. One application will insert record into MainInterfaceTable and the inserted record contains only values for columns which are to be updated into tables: log1 and log2 respectively. Columns which contain null values are not to be updated into log1 and log2 tables.
I can only think of using many "if" statements in my trigger to concatenate the UPDATE DML to update log1 and log2 tables. But if the MainInterfaceTable table contains many columns, it is not very efficient. {color:#800080}Is there any built in oracle functions or a more efficient to perform this task??{color}
{color:#800080}Any advises are greaatly appreciated. Thanks{color}
For E.g. In the below MainInterfaceTable record, I only update table log1 with txt1A column values. And update log2 table with col1 and col2B column values.
Column Values
txt1 null
txt1A 6
txt1B null
col1 ‘new orders'
col2A null
col2B ‘new purchase'
------------------------------my trigger -------------------------------------
CREATE TRIGGER TRG_MainInterfaceTable
AFTER INSERT ON MainInterfaceTable
FOR EACH ROW
DECLARE
sqlStmt VARCHAR2(2000); -- the SQL statement
BEGIN
sqlStmt := 'UPDATE log1 a SET 1=1 ';
if :*new*.txt1 is not null then
sqlStmt := sqlStmt || ' ,a.txt1 = ' || :*new*.txt1;
END IF
if :*new*.txt1A is not null then
sqlStmt := sqlStmt || ' ,a.txt1A = ' || :*new*.txt1A;
END IF
if :*new*.txt1B is not null then
sqlStmt := sqlStmt || ' ,a.txt1B = ' || :*new*.txt1B;
END IF
prc_run_update_sql_log1(sqlStmt);
------repeat more IF THEN for other tables
EXCEPTION
WHEN
-- exception handling
end TRG_MainInterfaceTable
--------------------------------------Table Structure------------------------------------------------------------------
create table MainInterfaceTable (
statuscol char(1),
txt1 varchar2(20),
txt1A number(6),
txt1B varchar2(20),
col1 varchar2(20),
col2A number(6),
col2B varchar2(20),
create table log1 (
txt1 varchar2(20),
txt1A number(6),
txt1B varchar2(20),
create table log2 (
col1 varchar2(20),
col2A number(6),
col2B varchar2(20),Thanks. I put the IF ELSE.. into a function and my codes looks neater. However I encounter a error when i try to pass in a DATE value.
ORA_06502 numeric or value error: host bind array too small
The error occur at the line in bold .
I try to run
Select TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI') from dual
in PL/SQL screen and it works.
Why the same TO_CHAR() syntax doesn't work in a function????
FUNCTION concatupdatequery(pVal IN DATE, pCol IN VARCHAR2, pSql IN VARCHAR2) RETURN VARCHAR2 IS
lvQueryStr VARCHAR2(30000);
lvTempDate VARCHAR2(100);
BEGIN
lvQueryStr := pSql;
IF pVal IS NOT NULL THEN
dbms_output.put_line('pVal = ' || pVal);
lvTempDate := TO_CHAR(pVal, 'DD-MON-YYYY HH24:MI:SS');
lvQueryStr:=pSql||','||pCol||'=TO_DATE('''||lvTempDate||''',''DD-MON-YYYY HH24:MI'')'; -- DATE data type
dbms_output.put_line('lvTempDate = ' || lvTempDate);
END IF;
RETURN lvQueryStr;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('concatupdatequery (DATE) :pCol:'||pCol||' ,pVal:'||pVal||' ,pSql:'||pSql);
dbms_output.put_line(SQLCODE||' - '||SQLERRM);
RAISE;
END concatupdatequery; -
Hi,
I need to write a trigger on the prr_no so that whenever it is inserted or updated the prr_ind (which is again in the same table) is automatically set to 'Y' if prr_no <> null and prr_ind set to 'N' if prr_no = null
I am using Oracle 11g, and following are the triggers I wrote, not sure which one is correct(as per my requirement):
CREATE OR REPLACE TRIGGER CMISTST1.update_PRR_IND
AFTER INSERT OR UPDATE OF PRR_NO
ON CMISTST1.T_ET_CCR_HDR
FOR EACH ROW WHEN (new.PRR_NO IS NOT NULL)
BEGIN
UPDATE T_ET_CCR_HDR
SET T_ET_CCR_HDR.PRR_IND = 'Y';
END;
*****OR*****
CREATE OR REPLACE TRIGGER CMISTST1.update_PRR_IND
AFTER INSERT OR UPDATE OF PRR_NO
ON CMISTST1.T_ET_CCR_HDR
FOR EACH ROW WHEN (new.PRR_NO IS NULL)
BEGIN
UPDATE T_ET_CCR_HDR
SET T_ET_CCR_HDR.PRR_IND = 'Y'
END;
but neither works! Here CMISTST1 is the schema, t_et_ccr_hdr is the table.
Thanks in advance!Elaborating on Justin's final remark and the fact you're on 11G, you could consider replacing the trigger by a virtual column:
SQL> create table t (prr_no number, prr_ind as (decode(prr_no, null, 'N', 'Y')));
Table created.
SQL> insert into t (prr_no) values (1);
1 row created.
SQL> insert into t (prr_no) values (null);
1 row created.
SQL> insert into t (prr_no) values (2);
1 row created.
SQL> insert into t (prr_no) values (null);
1 row created.
SQL> commit;
Commit complete.
SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade => true);
PL/SQL procedure successfully completed.
SQL> select /*+ gather_plan_statistics */
2 *
3 from t
4 where prr_ind = 'Y';
PRR_NO P
1 Y
2 Y
2 rows selected.
SQL> select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID 6sz2rzn1dwf6z, child number 0
select /*+ gather_plan_statistics */ * from t where prr_ind =
'Y'
Plan hash value: 1601196873
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |
| 0 | SELECT STATEMENT | | 1 | | 2 |00:00:00.01 | 8 |
|* 1 | TABLE ACCESS FULL| T | 1 | 2 | 2 |00:00:00.01 | 8 |
Predicate Information (identified by operation id):
1 - filter(DECODE(TO_CHAR("PRR_NO"),NULL,'N','Y')='Y')
19 rows selected.
SQL> create index t_i on t(prr_ind);
Index created.
SQL> exec dbms_stats.gather_table_stats(user, 'T', cascade => true);
PL/SQL procedure successfully completed.
SQL> select /*+ gather_plan_statistics */
2 *
3 from t
4 where prr_ind = 'Y';
PRR_NO P
1 Y
2 Y
2 rows selected.
SQL> select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID 6sz2rzn1dwf6z, child number 0
select /*+ gather_plan_statistics */ * from t where prr_ind =
'Y'
Plan hash value: 1658221841
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers |
| 0 | SELECT STATEMENT | | 1 | | 2 |00:00:00.01 | 4 |
| 1 | TABLE ACCESS BY INDEX ROWID| T | 1 | 2 | 2 |00:00:00.01 | 4 |
|* 2 | INDEX RANGE SCAN | T_I | 1 | 2 | 2 |00:00:00.01 | 2 |
Predicate Information (identified by operation id):
2 - access("PRR_IND"='Y')
20 rows selected.So, you can index a virtual column as well (or make it a key-column and so on...), as showed, just in case you were wondering.
Changing column values through triggers can be considered as 'doing stuff automagically'.
A virtual column would be more self-documenting as well, since it's part of the CREATE TABLE script. -
Help! Triggers won't work.
Hey,
I´ve made an animation, where you´re able to click the arrows for controlling the compass. I used triggers for stopping the animation (except the arrows). Everything is fine.
After that, I started to animate the beginning of that stage, where you have to click on the picture to open and rebuild it.
After doing this step, I can´t stop the animation with triggers neither with action code "click".
What did I wrong?
Thanks for all the answers.
Joey
(I´m sorry for my bad grammar. My speaking skill is much better than writing.)Of course there is. How did you know?
The error message means that there is no congruent parenthesis.
I´ll try your Idea.
Thanks a lot -
Help needed: triggering a combo box selection
I'm new to creating forms in Acrobat (Acrobat 9 on Mac). I'm trying to create a form for my department where a student selects a faculty name from a combo box, and once the value is selected, another field is filled with an int value (course section number).
Question: what is the correct trigger for executing the javascript for this? Mouse up seems to trigger too early and the others don't seem appropriate.
I think my rudimentary JavaScript knowledge can get me far enough to check the value and the use a switch/if to prefill the int value in the other field, so the correct trigger is my current issue.
Thanks in advance.I found where it's supposed to be stored, but I'm having some issues with missing (). I'm using Acrobat X Pro for Windows Vista. There was a post that I've spent the last 2 hours looking for that had a modified code that added in missing (), and now I can't find it Any help would be greatly appreciated. Anyway, here's my code:
function mater list for Alpha1()
var oAlpha1 = {
ACC: [
["-","None"], ["201",Intro to Financial Accounting], ["202",Intro to Managerial Accounting], ["-96",Selected Topics], ["-99",Directed Reading and Research]
ANTH: [
["-","None"], ["151",Emerging Humanity], ["152",Culture and Humanity], ["210",Archaeology], ["215",Physical Anthropology], ["215L",Physical Anthropology Lab], ["310",Human Origins], ["313",Culture Through Film], ["321",World Archeology], ["342",Indigenous Peoples & Modernity], ["350",Pacific Islands Cultures], ["351",Culture Thought and Behavior], ["358",Myth, Symbol, and Ritual], ["362",Gender, Culture, and Society], "380",Field Archaeology], ["383",Museum Studies], ["384",Human Skeletal Biology], ["415",Human Ecological Adaptation], ["420",Culture & Communication], ["422",Magic Witchcraft & Supernatl], ["423",Social and Cultural Change], ["437",Pacific Archaeology], ["447",Polynesian Cultures], ["448",Micronesian Cultures], ["457",Okinawans Locally & Globally], ["458",Forensic Investigations], ["460",Adv Tech in Forensic Anth], ["474",Culture and Mental Illness], ["483",Archaeology of Hawaii], ["487",Philippine Culture], ["490",History & Theory Anthropology], ["495",Research Seminar], ["496",Selctd Tpcs:], ["499",Directed Reading & Research], ["296F",Intro to Field Archaeology], ["496A",Culture Through Film], ["496B",Phillipines Studies], ["496C",Museum Studies], ["496D",Okinawans Locally & Globally], ["496E",Pacific Island Cultures]
APSC: [
["-","None"], ["486",Senior Project-Applied Sci], ["490",Senior Practicum], ["486C",Senior Project-CENT], ["486I",Senior Project-IT], ["486M",Senior Project-CULM], ["486R",Senior Project-RESP], ["490C",Admin Practicum-CENT], ["490I",Admin Practicum-IT], ["490M",Admin Practicum-CULM], ["490R",Admin Practicum-RESP]
ASTR: [
["-","None"], ["110",Survey of Astronomy]
It goes on like this through all our subjects. I then modified the next bits of code in thomp's doc to reflect what I need to be pulled and populated:
var nACCItems=oAlpha1["ACC"];
var n201Title=ACCItems[1]; var n202Title=ACCItems[1]; var n-96Title=ACCItems[1]; var n-99Title=ACCItems[1];
var nANTHItems=oAlpha1["ANTH"];
var n151Title=ANTHItems[1]; var n152Title=ANTHItems[1]; var n210Title=ANTHItems[1]; var n215Title=ANTHItems[1]; var n215LTitle=ANTHItems[1]; var n310Title=ANTHItems[1]; var n313Title=ANTHItems[1]; var n321Title=ANTHItems[1]; var n342Title=ANTHItems[1]; var n350Title=ANTHItems[1]; var n351Title=ANTHItems[1]; var n358Title=ANTHItems[1]; var n362Title=ANTHItems[1]; var n380Title=ANTHItems[1]; var n383Title=ANTHItems[1]; var n384Title=ANTHItems[1]; var n415Title=ANTHItems[1]; var n420Title=ANTHItems[1]; var n422Title=ANTHItems[1]; var n423Title=ANTHItems[1]; var n437Title=ANTHItems[1]; var n447Title=ANTHItems[1]; var n448Title=ANTHItems[1]; var n457Title=ANTHItems[1]; var n458Title=ANTHItems[1]; var n460Title=ANTHItems[1]; var n474Title=ANTHItems[1]; var n483Title=ANTHItems[1]; var n487Title=ANTHItems[1]; var n490Title=ANTHItems[1]; var n495Title=ANTHItems[1]; var n496Title=ANTHItems[1]; var n499Title=ANTHItems[1]; var n296FTitle=ANTHItems[1]; var n496ATitle=ANTHItems[1]; varn496BTitle=ANTHItems[1]; var n496CTitle=ANTHItems[1]; var n496DTitle=ANTHItems[1]; var n496ETitle=ANTHItems[1];
var nAPSCItems=oAlpha1["APSC"];
through all our subjects. Do I need to leave the lists of var nSUBJItems and var nNUMTitle separate, or is the way I have them (subject followed by titles in each subject) okay?
Then, I made the keystroke codes. Do they go in the Document level as well, or do they go in the keystroke event or both? Right now, I just have them as a doc level code because I can't save the document level code without fixing the () error. I'd just like to know ahead of time.
Number Keystroke Event
function SetNumberEntries()
if(event.willCommit)
// Get the numbers list from the Master List
// Since the selection is being committed,
// event.value contains the Alpha1 name
var lst = oAlpha1[event.value];
// Clear the Number list if there are no numbers for the selected alpha
if( (lst != null) && (lst.length > 0) )
this.getField("NumberSelect").setItems(lst);
else
this.getField("NumberSelect").clearItems();
// We have a new number list and the first entry is
// is a non-selection, so clear the title field.
this.getField("Title").value = 0;
Uncommitted Keystroke Event
function SetTitleValue()
// In order to get easy access to the export value, i.e. Title. This
// function needs to be run on the un-committed change event.
// This field is set up for Commit on select so we know the value
// will be committed anyway.
if(!event.willCommit)
// If the export value is Not written then
// set the title to --.
var nSelExp = --;
if(!isNaN(event.changeEx))
nSelExp = event.changeEx
this.getField("Title").value = nSelExp; -
Need help in triggering the Data stream load using process chain
Hi Guru's
is it possible to trigger a data stream load using process chain?
Any help is highly appreciated.
Thanks
IndiranHi Indiran and welcome aboard!
Don't think this is possible. SAP BW & SAP SEM-BCS are rather independent systems. Though, BCS lives on top of BI-BW stack, it even may have master data different from those in BW.
Process chains, AFAIK, is completely the BW's feature. Certainly, you may use PCc on BW side, loading ODS/DSO and cubes involved in BCS data model.
The main con here is the lost transparency -- you don't control everything from the consolidation monitor.
The pro side is also rather obvious for me. Since, very often there is a huge difference between data quality at the data source and in the BCS totals cube, I need to make a lot of data transformation. Not only some data calculations or cleaning, but also transformation of data model: key figure model -> account model. It's much more easier to do in BW, for me.
I even call the ODS/cubes/routines involved in such transformation as intermediate layer, the layer between data source and SEM-BCS.
And this layer lives rather independently from BCS.
Hope this helps. -
Help regarding Triggers in pl/sql
I have written a table level trigger .
Purpose it to execute a procedure for every insert in a particular table.
the procedure arguments is dependent on that table .the problem is It is exceuting the trigger properly but it is not calling the procedure .
I have attaced the the trigger code with this thread.Please help me regarding this procedure .
CREATE OR REPLACE TRIGGER FISCAL_UPD
AFTER INSERT OR UPDATE
OF FISCAL_START_DATE
ON PARAMETER
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
fsd_trg DATE;
BEGIN
SELECT fiscal_start_date
INTO fsd_trg
FROM parameter;
DBMS_OUTPUT.put_line ('eXECUTED ' || fsd_trg);
timedim(fsd_trg);
DBMS_OUTPUT.put_line ('eXECUTED ' || :NEW.fiscal_start_date);
END;
Thanks
prasannaHi,
SELECT fiscal_start_date
INTO fsd_trg
FROM parameter;
Are you getting any errors?
will this table will have only one record?
Regards
RK -
Help with triggering behaviours
Hi, I've just started using Java3D to build a simple networked virtual world for a university project. At the moment in the client each person in the world has their own transform group, and when a message arrives from the server saying someone has moved the TransformGroup methods getTransform() and setTransform() are used to move them
Obviously this is not ideal as it look jerky, i would prefer to use behaviours to move people so i could the built in interpolators and use animation.
My question is how can i trigger the relevant behaviour to wake up when a message is recieved? All of the standard WakeUpCriterion take events from the scene or the user and are no good to me, will i have to write my own WakeUpCriterion class or is there an easier way? If I do have to write my own, could anyone help me as I'm not sure what the methods allElements() and triggeredElements() are supposed to do
Thanks in advance :-)actually i am writing such a program too!!
hey...how can you make all the clients view the same scene???or did they create their own seperatly?? -
FOllowing is the process that I have gone through in creating the tables and trigger.
Now when I try to insert a row into mahesh_emp (while not passing anything for empno), I get an error:
ORA-00947: not enough values
I was asssuming, now that I have a trigger, I will not have to insert anything into that column. But it does not seem like this.
How can I set up mahesh_emp such that I wont have to insert empno and it willl get automatically updated with each inset statement?
CREATE TABLE mahesh_dept (
deptno NUMBER(4) PRIMARY KEY,
dname VARCHAR2(14),
loc VARCHAR2(13));
CREATE TABLE mahesh_emp (
empno NUMBER(4) PRIMARY KEY,
ename VARCHAR2(10),
job VARCHAR2(9),
mgr NUMBER(4),
sal NUMBER(7,2),
comm NUMBER(7,2),
deptno NUMBER(2),
FOREIGN KEY (DEPTNO) REFERENCES DEPT(DEPTNO));
CREATE SEQUENCE mahesh_emp_sequence
INCREMENT BY 1
START WITH 1
NOMAXVALUE
NOCYCLE
CACHE 10;
create or replace trigger mahesh_emp_trigger
before insert on mahesh_emp
for each row
begin
if :new.empno is null then
select mahesh_emp_sequence.nextval
into :new.empno
from dual;
end if;
end;Much like Todd's explanation the INSERT is the problem. My guess is that the new auto populated column was removed from the VALUES clause, but not from the inserted column list. Unless your coding that bad and not specifying the column names ;).
insert into mahesh_emp
empno (1), (should also be removed)
ename (2),
job (3),
mgr (4),
sal (5),
comm (6),
deptno (7)
values
B (1),
C (2),
D (3),
E (4),
F (5),
G (6)
Or like he said, put a NULL in it's palce in the values list.
Good luck in the future and beyond,
Tyler D. -
Change of Search help for location field in report incident
Hi All,
i have added new fields Region,BSA in the report incident form .here based on the region entered in the search help the corresponding bsa have to be displayed in the search help of BSA .these are achieved customising the search help exit FM EHFND_SHLP_EXIT_F4_BOBF_QUERY.
similarly based on the BSA entered in the BSA field Location field search help should filter the values and display .the isues here are
1. the location field and search help attached are standard and they are being used in many instances .
2.when i click on the f4 help the control doesnt stop any where in the feeder class CL_EHHSS_INC_Q_LOC_UI_FRM of the form though i put the breakpoints .ie the event on enter locid is not getting triggered.
my question is where can i write the code to filter the values being displayed in the location search help.
Thanks&Regards
LuxmiHi Luxmi,
Dictionary-based search helps are triggered from directly within the WDA layer. Therefore, there is no callback from the FPM event loop. The filter would need to be implemented as an implicit enhancement of the aforementioned search help exit function.
Thanks,
James -
Analog Source Triggering with more than one channel in channel list
Hello,
I am trying to use an analog reference trigger with a channel list that contains more than one entry using a
M Series 6289. I am aware that this is generally not possible to have more than one channel in the list due to hardware limitations. I was hoping if some sort of workaround exists.
I am using the NIDAQmx C API to control the card.
Using a second card that is syncronized via RTSI should
allow me to use an analog reference trigger to control multiple analog IO channels ... Right ???
Thanks for any advice!
Best regards
PeterHello Peter,
If you look at the NI-DAQmx Help, Analog Triggering Considerations for E Series, M Series, and S Series Devices section, it says that to pause multiple channels with an Analog trigger, you must wire that signal to APFI0 or APFI1. Therefore, it is possible to perform this operation.
If you are sharing the AI Sample Clock across RTSI, then you would be able to stop multiple AI channels across multiple devices with the one Analog Reference Trigger.
I hope this helps,
Sean C.
Maybe you are looking for
-
New name for the product?
The name Oracle Express Edition seems to be causing a bit of confusion as there is already an Oracle Express in the stable, some kind of OLAP tool. So I was just wondering why Oracle went for a name so close to an existing product. I have a couple of
-
There's a cross in the battery-icon..;what does that mean?
well,everything is in the subject...thank you for every little help,i'm new in using a mac,and i'm aware that maybe this question seems completely stupid to some of you!:) thx
-
Minimize, Maximize and Close buttons are invisible
I have rather werid problem with Firefox since yesterday. Mainly the three buttons at the top corner are invisible. I can still click on them but I cannot see them, as if they are obscured by upper tab. I tried to launch Firefox in safe mode and I us
-
Exchange 2013 - 453 4.3.1 Insufficient system resources".
Hi, I have 2 virtualized exchange 2013 servers. Other mail systems are reporting that emails are taking a long time to get processed by our Exchange server due to "453 4.3.1 Insufficient system resources"." Our database has plenty of space to grow so
-
Where to find Patches for L8 synths
Howdy folks. A bunch of the synths in L8 are pretty skimpy when it comes to the number of factory installed presets. Maybe its because some of the ones in particular, like the ESE or ESM, are not that sophisticated...I don't know, just guessing. Does