Strange data inserted into table via table trigger
Hi ,
There is some strange phenomenon happen occasionally where some tables update records will have a TRIGGER to insert records into a table and once in a while, the record has some strange data inserted which looks like a memory corruption. It is running on 10.2.0.3.
Does anyone ever encounter this before?
Strange result:
PRIM_KEY
-3.614364951000000000000000000000000E-47
-3.614364951000000000000000000000000E-47
Normal result:
PRIM_KEY
1137KT
1137KT
ana
Hi,
What is strange in this? Its not memory corruption. Its just one of the numeric form of representation of number
-3.614364951000000000000000000000000E-47it means -3.614364951 * 10 to the power of -47.
Whatever value has been entered into the table depends on your business logic you coded, and user input.
Regards
Similar Messages
-
XSQL Insert into Schema based Table
Hi,
I am struggling with this one:
My test XML is well formed:
<?xml version="1.0"?>
<SC_ESP>
<ResultSet>
<ApplicationID>App0001</ApplicationID>
<Reason>Sucess</Reason>
</ResultSet>
</SC_ESP>
Whan I try to POST this XML data via the XSQL Servlet
I get the following error:
"Character '$' is not allowed in a XML tag name."
Anyone (Mark ?) know what it means ?
Thanks
MartinHello Mark,
I don't know which time zone you are in but thanks for the very prompt replies.
All I am trying to with this test is provide an XML input test facility via HTTP. The users are supposed to paste the XML into a TextAre using their browser and have that data inserted into the corresponding Table(s) via the XSQL servlet.
The XML schema have already been registered but I note from your other reply that I have not added the annotation xdb:storeVarrayAsTable="true" to the schema tags.
It is worth noting that the whole thing works if I create a simple table that is NOT related to an XML Shema.
You say that you have not had to use the XSQl Servlet. Would you care to say what approach you would use for the above requirement. Shall I set about writing my own Servlet to do this. -
How to select data from 3rd row of Excel to insert into Sql server table using ssis
Hi,
Iam having Excel files with headers in first two rows , i want two skip that two rows and select data from 3rd row to insert into Sql Server table using ssis.3rd row is having column names.CUSTOMER DETAILS
REGION
COL1 COL2 COL3 COL4 COL5 COL6 COL7
COL8 COL9 COL10 COL11
1 XXX yyyy zzzz
2 XXX yyyy zzzzz
3 XXX yyyy zzzzz
4 XXX yyyy zzzzz
First two rows having cells merged and with headings in excel , i want two skip the first two rows and select the data from 3rd row and insert into sql server using ssis
Set range within Excel command as per below
See
http://www.joellipman.com/articles/microsoft/sql-server/ssis/646-ssis-skip-rows-in-excel-source-file.html
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
How to insert this date colum into some other table
Hi all,
I have to write a procedure to select the data from one table & insert date column data into another table,the data is in different date formats,but in the second table date column format should be (mm/dd/yyyy) .
example:
if the date in first table is 1992 it should be modify to "01-01-1992" & insert into the second table.But the values should be different(below are the different types).
RELEASE_DATE
1992
1962
July 1987
Aug 1968
10/30/06
6/1/2005
2004
7.25.1951
12/12/2006
12/1/2005
1992
2003
2005
1958
2002
11/11/03
1/1/91
50-21-2001
10.28.1991
Please any body can help.<FONT FACE="Arial" size=2 color="2D0000">
Thanks..! for giving the data type..
Here is an example..
SQL> desc atestdate
Name Null? Type
CHARDATE VARCHAR2(10)
ACTDATE DATE
SQL> select * from atestdate;
1992
July 1987
Aug 1968
10/30/06
6/1/2005
2004
7.25.1951
12/12/2006
12/1/2005
1992
2003
2005
1958
2002
11/11/03
1/1/91
50-21-2001
10.28.1991
18 rows selected.
SQL> select <font color="#0000ff">char_trim_x</font>(chardate) from atestdate;
1992
July-1987
Aug-1968
10-30-06
6-1-2005
2004
7-25-1951
12-12-2006
12-1-2005
1992
2003
2005
1958
2002
11-11-03
1-1-91
50-21-2001<font color="#8000ff">--? 50 can not be a month nor a date do not give junk values</font>
10-28-1991
18 rows selected.
<font color="#0000ff">char_trim_x</font> This is a function which I have created with REPLACE function
this brings to some extent of an orderly format..
<font color="#008000">But you have not yet posted your work ..</font>
-SK
</FONT> -
*HOW TO INSERT DATA MANUALLY INTO A BW TABLE*
Dear experts,
I'm working in BW 3.5 version.
Since I need to test some tables which are going to be load manually, please could anyone explain me which are the steps to insert data manually into a BW table.
Thank you very much in advance,
JorgeHi Jorge,
You can maintain the TMG(Table maintenance generator) and then enter the data manually. TMG creation Tcode is se55. and to view and maintain TMG it is sm30 .
Or if you have the data in excel. You can write a simple excel uploading ABAP program which will load your excel data to the table .
Hope the above reply was helpful.
Thanks & Regards,
Ashutosh Singh
Edited by: Ashutosh Singh on Apr 30, 2011 6:45 AM -
How is the data inserted into CST_INV_QTY_TEMP table?
Hi All,
How is the data inserted into CST_INV_QTY_TEMP table ?
Thanks in advance,
Mayur
Edited by: 928178 on 17-Apr-2012 04:29How is the data inserted into CST_INV_QTY_TEMP table ?TABLE: BOM.CST_INV_QTY_TEMP
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=CST_INV_QTY_TEMP&c_owner=BOM&c_type=TABLE
Thanks,
Hussein -
Inserts into Global Temporary Table
I'm working on using a global temporary table in one of my apps. I have a small test run here to isolate the problem. It simply creates the global temporary table, inserts a row, commits and then does a select to see if the insert worked. No data shows in the table when running this. I don't know much about global temp tables, so any help would be appreciated.
CREATE GLOBAL TEMPORARY TABLE AGENT_SILO.AS_TEMP_VALIDATE (
SBI_EMPLOYEE_ID NUMBER,
CURRENT_FLAG char(1),
EFFECTIVE_START date,
EFFECTIVE_END date
) ON COMMIT DELETE ROWS;
INSERT INTO AGENT_SILO.AS_TEMP_VALIDATE(SBI_EMPLOYEE_ID, CURRENT_FLAG, EFFECTIVE_START, EFFECTIVE_END)
VALUES(0, '', SYSDATE, SYSDATE);
commit;
SELECT * FROM AGENT_SILO.AS_TEMP_VALIDATE;So I wonder what else I'm doing wrong that's really obvious. Here's what i'm trying to accomplish and maybe there's a better way of going about it.
I have a trigger that is supposed to do some validation before the insert is allowed to go through. So here's my approach. I have a trigger fired when there's an insert into the AS_Employee_history table. This passes some of the fields from this insert into a proc (the id, a flag and a couple of dates). Within the proc, i create a global temp table, insert these passed values into the temp table. Then I have a cursor to basically copy the rows from the as_employee_history table that have the same id. Then I can do some selects on the temp table to see if it passes the validation.
I have outputs throughout for debugging and it gets to right after the inserts into the temp table, then the rest of the code doesn't appear to be executed. So it looks like it's failing at the execution of select statements on the temp table. Anything else obvious that I"m missing here?
Here's my proc.
PROCEDURE "PAS_VALIDATE" (STATUS OUT VARCHAR2, v_status OUT BOOLEAN, NEW_SBI_EMPLOYEE_ID IN NUMBER,
NEW_CURRENT_FLAG IN CHAR, NEW_EFFECTIVE_START IN DATE,
NEW_EFFECTIVE_END IN DATE)
IS
v_prev_effective_end date;
v_flag_count number;
v_flag_count_date number;
--variables to store dynamic sql returns
v_sql_flag_count_date varchar2(255);
v_sql_flag_count varchar2(255);
v_sql_prev_eff_end varchar2(255);
cursor c_row is
select * from AGENT_SILO.AS_EMPLOYEE_HISTORY EMP
where (EMP.SBI_EMPLOYEE_ID = NEW_SBI_EMPLOYEE_ID);
r_row c_row%ROWTYPE;
BEGIN
Status := 'Started';
v_status := true;
DBMS_OUTPUT.PUT_LINE('Creating temporary table...');
execute immediate 'CREATE GLOBAL TEMPORARY TABLE AGENT_SILO.AS_TEMP_VALIDATE (
SBI_EMPLOYEE_ID NUMBER,
CURRENT_FLAG char(1),
EFFECTIVE_START date,
EFFECTIVE_END date
) ON COMMIT PRESERVE ROWS';
DBMS_OUTPUT.PUT_LINE('Validating the data...');
--DBMS_OUTPUT.PUT_LINE('Inserting submitted row into temp table');
--Insert the new row being submitted from user into the temp table
execute immediate 'INSERT INTO AGENT_SILO.AS_TEMP_VALIDATE(SBI_EMPLOYEE_ID, CURRENT_FLAG, EFFECTIVE_START, EFFECTIVE_END)
VALUES(' || NEW_SBI_EMPLOYEE_ID || ',
''' || NEW_CURRENT_FLAG || ''',
to_date(''' || to_char(NEW_EFFECTIVE_START, 'mm/dd/yyyy hh:mi:ss') || ''', ''mm/dd/yyyy hh:mi:ss''),
to_date(''' || to_char(NEW_EFFECTIVE_END, 'mm/dd/yyyy hh:mi:ss') || ''', ''mm/dd/yyyy hh:mi:ss''))';
--Insert the other rows to we end up with a subset of the employee history table
--with only rows that match the sbi_employee_id of the submitted row
--DBMS_OUTPUT.PUT_LINE('Inserting into temp table...');
open c_row;
loop
fetch c_row into r_row;
exit when c_row%NOTFOUND;
execute immediate 'INSERT INTO AGENT_SILO.AS_TEMP_VALIDATE(SBI_EMPLOYEE_ID, CURRENT_FLAG, EFFECTIVE_START, EFFECTIVE_END)
VALUES(' || r_row.SBI_EMPLOYEE_ID || ',
''' || r_row.CURRENT_FLAG || ''',
to_date(''' || to_char(r_row.EFFECTIVE_START, 'mm/dd/yyyy hh:mi:ss') || ''', ''mm/dd/yyyy hh:mi:ss''),
to_date(''' || to_char(r_row.EFFECTIVE_END, 'mm/dd/yyyy hh:mi:ss') || ''', ''mm/dd/yyyy hh:mi:ss''))';
end loop;
close c_row;
DBMS_OUTPUT.PUT_LINE('After inserts');
-----Store queries to determine values for validation--------------------------
v_sql_prev_eff_end := 'SELECT to_char(max(effective_end), ''dd-mon-yy'')
FROM AGENT_SILO.AS_TEMP_VALIDATE
where to_char(EFFECTIVE_END, ''dd-mon-yy'') != ''31-dec-99'' AND
SBI_EMPLOYEE_ID = NEW_SBI_EMPLOYEE_ID';
--Find the largest effective_end, besides the 9999 value
execute immediate v_sql_prev_eff_end into v_prev_effective_end;
DBMS_OUTPUT.PUT_LINE('The highest previous end date: ' || v_prev_effective_end);
--...........Validation testing...........
execute immediate 'DROP TABLE AGENT_SILO.AS_TEMP_VALIDATE'; --Drop temp table
DBMS_OUTPUT.PUT_LINE('Validation Procedure Complete');
COMMIT;
status:='Success';
EXCEPTION
When Others Then
ROLLBACK;
Status := SQLERRM;
END;
Thanks a bunch for helping a noob out. -
How to insert into two differents tables at the same time
Hi
I'm newer using JDev, (version 3.1.1.2 cause the OAS seems to support just the JSP 1.0)
and I want to insert into two differents tables at the same time using one view.
How can I do that ?
TIA
EdgarOracle 8i supports 'INSTEAD OF' triggers on object views so you could use a process similar to the following:
1. Create an object view that joins your two tables. 'CREATE OR REPLACE VIEW test AS SELECT d.deptno, d.deptname, e.empname FROM DEPT d, EMP E'.
2. Create an INSTEAD OF trigger on the view.
3. Put code in the trigger that looks at the :NEW values being processed and determines which columns should be used to INSERT or UPDATE for each table. Crude pseudo-code might be:
IF :NEW.deptno NOT IN (SELECT deptno FROM DEPT) THEN
INSERT INTO dept VALUES(:NEW.deptno, :NEW.deptname);
INSERT INTO emp VALUES (:NEW.deptno, :NEW.empname);
ELSE
IF :NEW.deptname IS NOT NULL THEN
UPDATE dept SET deptname = :NEW.deptname
WHERE deptno = :NEW.deptno;
END IF;
IF :NEW.empname IS NOT NULL THEN
UPDATE emp SET empname = :NEW.empname
WHERE deptno = :NEW.deptno;
Try something along those lines.
null -
Dear All,
I have created a materialized view which refreshes on commit.materialized view is enabled query rewrite.I have created a materialized view log on the base table also While inserting into the base table it takes lot of time................Can u please tell me why?Dear Rahul,
Here is my materialized view..........
create materialized view mv_test on prebuilt table refresh force on commit
enable query rewrite as
SELECT P.PID,
SUM(HH_REGD) AS HH_REGD,
SUM(INPRO_WORKS) AS INPRO_WORKS,
SUM(COMP_WORKS) AS COMP_WORKS,
SUM(SKILL_WAGE) AS SKILL_WAGE,
SUM(UN_SKILL_WAGE) AS UN_SKILL_WAGE,
SUM(WAGE_ADVANCE) AS WAGE_ADVANCE,
SUM(MAT_AMT) AS MAT_AMT,
SUM(DAYS) AS DAYS,
P.INYYYYMM,P.FIN_YEAR
FROM PROG_MONTHLY P
WHERE SUBSTR(PID,5,2)<>'PP'
GROUP BY PID,P.INYYYYMM,P.FIN_YEAR;
Please help me if query enable rewrite does any performance degradation......
Thanks & Regards
Kris -
Multi-table mapping is not inserting into the primary table first.
I have an inheritance mapping where the children are mapped to the parent table oids with the "Multi-Table Info" tab.
One of children is not inserting properly. Its insert is attempting to insert into one of the tables from the "Additional Tables" of "Multi-Table Info" instead of the primary table that it is mapped to.
The other children insert correctly. This child is not much different from those.
I looked through the forums, but found nothing similiar.I would expect the Children to be inserted into both the primary table and the Additional Table? Is the object in question inserted into the primary table at all? Is the problem that it is being inserted into the Additional Table first? If it is, are the primary key names different? Is it a foreign key relationship?
If the object in question has no fields in the additional table is it mapped to the additional table? (it should not be)
Perhaps providing the deployment XML will help determine the problem,
--Gordon -
Using external parameters within MS Query returning that data right into a pivot table Excel 2010
In Excel 2010 i was able to use the external parameters within MS Query returning that data right into a pivot table. But the parameter on the worksheet will not save in the paremeter setting of the data connection. And if you save it and open
it and try to refresh the pivot table Excel stops responding and you have to force the file closed. I found out the reason to crash is that it did not keep the parameter saved.
Can this be fixed?Hi,
Just
checking in to see if the information of Oskar was helpful. Please
let us know if you would like further assistance.
Jaynet Zhang
TechNet Community Support -
Nologging direct-path insert into an indexed table
Hello,
Does anyone have an idea how I can suppress generation of undo logs for direct-path insert into an indexed table on 11.2.0.1.0:
CREATE TABLE TBL(ID NUMBER) NOLOGGING;
CREATE INDEX IDX ON TBL(ID) NOLOGGING;
INSERT /*+ APPEND */ INTO TBL SELECT /*+ APPEND */ ROWNUM FROM ...; -- Source table has 400,000,000+ rows
Regards,
Angel TsankovPl do not post duplicates - Why does Oracle not use direct-path insert when instructed to do so - pl continue the discussion in your original thread
-
How to execute a Java method when row inserted into a database table?
I have the need to fire off a java method when a row is inserted into a database table. I am unfortunately working with MySQL which just recently supported triggers but these new triggers can not execute a Java application on any event.
What I am looking for is an event driven approach such that when a row is inserted into a specific table I can fire off a java method (sitting in a tomcat container) that will take the contents and send it to a web service.
It has been mentioned that JMS may have the ability to poll and monitor a database table. Just wondering if anyone could point me in the right direction.
thanks
JavaTekA service handler might be the right way to run some code at the end of a service call (another way would be to make use of filters).
First, make sure your static table is merged with ServiceHandlers.
Secondary, change your custom method name into one that is not already in the service definition of COLLECTION_COPY_LOT (preferably a unique method name like collectionCopyLotLastAction that describes its purpose) and remove the following line from your code:
m_service.doCodeEx("",this);Now create a service definition for COLLECTION_COPY_LOT in your custom component based on the original COLLECTION_COPY_LOT (copy paste from the original service definition) and add you own method collectionCopyLotLastAction as the last step in the service. Play with the load order to make sure CS is using your service definition of COLLECTION_COPY_LOT instead of the original.
regards,
Fabian -
How to delete the data loaded into MySQL target table using Scripts
Hi Experts
I created a Job with a validation transformation. If the Validation was failed the data passed the validation will be loaded into Pass table and the data failed will be loaded into failed table.
My requirement was if the data was loaded into Failed database table then i have to delete the data loaded into the Passed table using Script.
But in the script i have written the code as
sql('database','delete from <tablename>');
but as it is an SQL Query execution it is rising exception for the query.
How can i delete the data loaded into MySQL Target table using scripts.
Please guide me for this error
Thanks in Advance
PrasannaKumarHi Dirk Venken
I got the Solution, the mistake i did was the query is not correct regarding MySQL.
sql('MySQL', 'truncate world.customer_salesfact_details')
error query
sql('MySQL', 'delete table world.customer_salesfact_details')
Thanks for your concern
PrasannaKumar -
How is the data inserted into JTF_RS_SALESREPS?
Hi,
I wanted to know how is the data inserted into JTF_RS_SALESREPS.When we import the resources from CRM Foundation responsibilty the data will be inserted into jtf_rs_resource_extns.I think we need to run a concurrent program to transfer data from jtf_rs_resource_extns to JTF_RS_SALESREPS.
Which Concurrent program should be run?
Please help.
Thanks.How is the data inserted into CST_INV_QTY_TEMP table ?TABLE: BOM.CST_INV_QTY_TEMP
http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=CST_INV_QTY_TEMP&c_owner=BOM&c_type=TABLE
Thanks,
Hussein
Maybe you are looking for
-
Hello, I'm getting an Error Code 1 message when trying to download the test APP from the DPS APP Builder. I've tried re-building the document (a process that takes almost 8 hours in my case as our APP features 110 articles including almost 1000 image
-
Firefox is running in the background but I can't open it. I need to explain more.
I think I enabled an add on after which FX wouldn't open. In any event FX will not open now. My PC is running Window 7. I went into task manager and closed any FX processes that were running. Still wouldn't open. Then I tried uninstalling FX and rein
-
How to include the hebrew languare in the Oracle Data?
Hi All, I'm using this code in nls_lang value in the registry to include Arabic and English languages in the data: AMERICAN_AMERICA.AR8MSWIN1256 but how to include the hebrew language to be used in the data also Plz? Note: I'm using Oracle DB 10g R2
-
Recognizing imported iTunes between 2 iMacs??
I recently bought a new iMac listed below and am trying to import my iTunes, iPhotos, Entourage Address Lists to this machine from a flat screen iMac with nonfunctioning monitor. I managed to get the iTunes on to the new iMac desktop and into the Mus
-
I recently had to send my iphone off for repair and when I have got it back it has been reset to factory settings. Can I get my phonos,music etc back through icoulds ?