Error updating tables based on schema
Hello,
I'm trying to update a table based on the next schema:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xdb="http://xmlns.oracle.com/xdb" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="HILO" xdb:SQLType="HILO_TYPE" xdb:defaultTable="HILO_TABLE">
<xs:complexType>
<xs:sequence>
<xs:element name="MENSAJE" maxOccurs="unbounded" xdb:SQLType="MENSAJE_TYPE" xdb:maintainOrder="false">
<xs:complexType>
<xs:sequence>
<xs:element name="FECHA" type="xs:date" xdb:SQLType="DATE"/>
<xs:element name="TITULO" xdb:SQLType="VARCHAR2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="200"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CUERPO" type="xs:string" xdb:SQLType="VARCHAR2"/>
<xs:element name="DNI_CREADO_POR" xdb:SQLType="VARCHAR2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="9"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ASIGNATURA" xdb:SQLType="VARCHAR2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="APROBADO" xdb:SQLType="VARCHAR2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="APROBADO"/>
<xs:enumeration value="RECHAZADO"/>
<xs:enumeration value="PENDIENTE"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:attribute name="NUMERO" type="xs:int" use="required" xdb:SQLType="INTEGER"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="CONTADOR" type="xs:int" use="required" xdb:SQLType="INTEGER"/>
</xs:complexType>
</xs:element>
</xs:schema>
And the update that i'm trying to do is the next one:
UPDATE hilo_table p
SET value(p) =
updatexml(value(p),'/HILO/MENSAJE/CUERPO/text()', 'Edit' )
where existsnode(VALUE(p), 'HILO[@CONTADOR="1"]') = 1;
ERROR en línea 1:
ORA-01732: operación de manipulación de datos no válida en esta vista
I have updated another tables based on schema and it works fine, any idea?
OK this is your decision. However If you are building a production system that is important to your orgnanization as the product manager I strongly recommend that you either upgrade to a least 9.2.0.3.0 or discontinue using XML DB technology completely
There are probably somewhere in the order of 500 serious XML DB related bugs fixed between 9.2.0.1.0 and 9.2.0.7.0, all of which have been regarded as serious enough to impossible for a customer to develop or deploy a production system. None of these will EVER be fixed or available as patches for 9.2.0.1.0.
The way in which we store the data on the disc is different in 9.2.0.3.0, and while in theory we migrate the on disc format when you upgrade in practice I know that is has never been tested with any significant amount of data present.
Also you really want to take the support situation into account. Image this, it's 3:00am in the morning and your production system fails due one of the bugs that have been fixed in a later release of the product. You cannot find a workaround and you call oracle support for help. They WILL say, sorry there is nothing we can do until you upgrade to 9.2.0.3.0. Now you have to upgrade in hurry and then re-test everything you have done before you can even start working on a fix.
From a business perspective staying on 9.2.0.1.0 and continuing to use the XML DB technology makes no sense. I hope I have made this clear. If you want I will be more than happy to discuss this issue with your development managers.
Similar Messages
-
How to find latest updated tables in current schema.
Hi,
I am in 3rd line support work, jobs(unix shell scripts) are running on daily at scheduled time.
Regarding to my work, i need to found latest updated tables.
How to find latest updated tables in current schema.
please guide me.
Thanks and Regards,
Venkat.duplicate thread
Answers on other thread: How to find latest updated tables in current schema. -
Hi friends,
when iam generating a excise invocie the system triggers"Error updating table 372"
Any possible solution for this?
Thanks
IvyDear All,
I done this--by doing some configuration changes.
Normally while doing Exports we are tempted to use the same sales area and accordingly we may give the combination of excise grp+series grp+export type in IMG>>>Logistics General>>>India>>>Business transactions>>>Outgoing excise invoices>>>Maintain default excise groups and series groups.
Once after removing the export type to your sales area combination--system will show this error--and we cannot even post the Excise invoices.(J1IIN)
I tried in my IDES--that with export type(Ex.Export under Bond)--with this assignment--i am able to post my excise invoices.
Once after removing this assignment of export type--again i am getting this error.
Actually i am not even aware why it is happening--almost after two months of struggle--i find this.
(i feel it is in the same way that we cannot even open/See a sales order by deleting sales group which was created&used previously)
i am sharing this because somebody may get a little help with my thread.
Mark this if helpful--there by others can easily find this thread.
Phanikumar -
Error Updating table condition table 372 in J1IIN
Hello all,
I am facing the problem while working in ECC 6.0 environment in the transaction code J1IIN.
I have maintained the condition type JEXP ( A/R BED %) as 14% with the Key combination Country/Plant/Control Code (Table 357). While iam saving the Excise invoice the system is throwing the error like error updating the table condition table 372
I have gone through the post given by Ms. Jyoti few days back and tried to do some changes in the customisation.
I tried to maintain a different access sequence for the condition type JEXP i.e a new Access sequence(ZJEX) and also a new condition tpe (ZJEP). We don't have other Excise condition type in our Pricing procedure.
In the access sequence except condition table 372, I have maintained all other condition tables.
Still the error is persisiting. Can anyone put some light on the issue.
I have even traced the values being hit in the tables directly. There is no relation of table 372, then why is it being cause of the error.
Also while debugging it gives a message "An exception (CX_BADI_INITIAL_REFERENCE) occured".
Does this help in anyways.
Gurus plz give u r suggestions.
Thanks in advance,
Regards,
Karthik.Hello Srinivas/Sandeep
Please ensure that access sequence in the condition type JEXC has got the table 372. If it is not there please maintain it.
The standard access sequence used in all duty condition type
is JEXC which has got the table 372 this will get updated once
you save your excise invoice.
If the issue is resolved, kinldy close the message.
Regards
MBS -
Update table based on ID reference comparing each column and value
Hi,
Through UI user can update any information and click save. In backend i will be receiving only ID as reference . Based on the ID value i should update multiple tables wherever i have the reference tables. Here i will not get the values or column name updated.
I just get a ID to find which row is updated.
I should do a comparision now.
I have a history table where i get the row before updation. and i get a row after updation from current data i.e. from ssdb_Railroad[This will be updated by java after updation we will get the ID inorder to update remaining tables]. Now i need to compare
both the table column values and know which column is updated and after getting the value i should update reference tables.
Below is the structure for comparision table , History table and Main table.
Create table Comparision_History (
ID int IDENTITY(1,1) PRIMARY KEY,
InsertUser_UpdateUser varchar(50),
Old_ColVal varchar(100),
New_ColVal varchar(100),
TableName varchar(100),
[Action] varchar(50),
InsertDate_UpdateDate Datetime NOT NULL DEFAULT getdate()
CREATE TABLE SSDB_Railroad_History (
ID int IDENTITY PRIMARY KEY,
SCAC varchar(4) ,
Name varchar(50) NOT NULL,
RailroadID int NOT NULL UNIQUE,
RC2Key
varchar(50),
NOTES varchar(1000),
[Action] varchar(50),
InsertDate_UpdateDate Datetime NOT NULL DEFAULT getdate(),
InsertUser_UpdateUser varchar(50),
CREATE TABLE SSDB_Railroad (
ID int IDENTITY(1,1)PRIMARY KEY,
SCAC varchar(4) UNIQUE,
Name varchar(50) NOT NULL,
RailroadID int NOT NULL UNIQUE,
RC2Key
varchar(50),
InsertDate Datetime NOT NULL DEFAULT getdate(),
UpdateDate Datetime,
InsertUser varchar(50),
UpdateUser varchar(50)
Here SSDB_Railroad table and History table needs to be compared and get a updated value and it should be inserted in a comparision table. as well as it should be updated in reference tables.
Please help me with the code.
Thanks in Advance
DeepaHi Deepa_Deepu,
According to your description, personally, the merge function can meet your requirements. Usually, we can synchronize two tables by updating or inserting rows in a target table based on differences found in the source tables. Just as your description, when
the value of ID and InsertDate_UpdateDate in the source table matches a value, update them in the target table. When the values does not match, the source row is inserted into the target table.
For more information, see: using MERGE to perform UPDATE and INSERT operations on a target table by using a derived source table.
http://msdn.microsoft.com/zh-cn/library/bb510625.aspx
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Update table based on collection
Hello friends,
I have two tables:
1- PHOTOS (img_id number (5,0),Product_id number (5,0), Content Blob ....)
2- PRODUCTS (Product_id number (5,0), product_type .... )
each product has 1 to 6 images.
I need to watermark the uploaded images in the memory then update the original images for the watermarked images.
I used this code, but the problem is how to update the images in the photos table based on the product_id ???
DECLARE
type source_col is table of blob index by pls_integer ;
V_source source_col;
cursor c1 is select CONTENT from photos where Product_id = :P22_Product_id;
counter number :=1;
added_image BLOB;
prop ordsys.ord_str_list;
logging VARCHAR2(2000);
begin
--- Here we choose a pattern for watermarking from a table called WATERMARK_PHOTOS
select img INTO added_image FROM WATERMARK_PHOTOS WHERE N = 1;
for rec in c1 loop
V_source(counter) := rec.CONTENT;
ORDSYS.ORDImage.process(V_source(counter), 'fixedScale=900 500');
ORDSYS.ORDImage.applyWatermark(V_source(counter), added_image, V_source(counter), logging, prop);
--- The problem in the following statement: How to update the images
UPDATE photos SET CONTENT = V_source(counter) where Product_id = :P22_Product_id;
Counter := counter + 1 ;
end loop;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;Thanks Sybrand,
I am using Oracle 11g R2 Standard One edition.
the DDL of the photos table is
ID NUMBER 5 0
product_id NUMBER 5 0
FILENAME VARCHAR2 100
MIMTYPE VARCHAR2 250
FILESIZE VARCHAR2 20
CONTENT BLOB in my application I do not know the image id in advance, but i know the id of the product of which I want to edit the images. So:
in the following procedure :p22_product_id is the value of of the primary key of Products table.
I followed your tips, and it worked out. Can you please check and assure that it is OK :
DECLARE
type source_col is table of blob index by pls_integer ;
V_source source_col;
type id_col is table of number index by pls_integer ;
V_id id_col;
added_image BLOB;
prop ordsys.ord_str_list;
logging VARCHAR2(2000);
begin
select content bulk collect into V_source from photos where product_id = :p22_product_id order by id ;
select id bulk collect into V_id from photos where product_id = :p22_product_id order by id ;
SELECT img INTO added_image FROM timg WHERE N = 1;
for i in V_source.first .. V_source.last
loop
ORDSYS.ORDImage.process(V_source(i), 'fixedScale=900 500');
ORDSYS.ORDImage.applyWatermark(V_source(i), added_image, V_source(i), logging, prop);
UPDATE photos SET CONTENT = V_source(i) where id = V_id(i);
end loop;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;Best Regards,
Fateh -
HI,
When I am generating a excise invoice the system triggers u201CError updating table 372"
I have not maintained of table 372 in access seq (Cd type (JEXP) . Previous i have maintained this table in my access seq and its working fine but I am not able to save the document,
in that time i got error like
No account is specified in item 0000000001
Message no. F5670
Diagnosis
No account was specified for account type "S" in item "0000000001" of the FI/CO document.
System Response
The Financial Accounting program cannot process the document.
Procedure
A system error has probably occurred in the application you called up. Check the data transferred to item "0000000001" of the FI/CO document.
Pl let me know if anything else is required to avoid further problems
All errors I have attached with screen shot pl give me reply .
Pl let me know if anything else is required to avoid further problems
Any possible solution for this?
1 ) IN VKOA transaction G/L accounts which are assigned in our sales account keys with combination of condition table fields is :
App CndTy. ChAc SOr AAG AAG ActKy G/L acct
V KOFI CAIN ERRO 01 06 ERL 300009 Sales
V KOFI CAIN ERRO 01 06 EXD 140014 CENVAT Clearing
V KOFI CAIN ERRO 01 06 EXS 140009 Ed Cess
V KOFI CAIN ERRO 01 06 MW3 140071 VAT
V KOFI CAIN ERRO 01 06 MWS 140071
V KOFK CAIN ERRO 01 06 ERL 300009
V KOFK CAIN ERRO 01 06 EXD 140014
V KOFK CAIN ERRO 01 06 EXS 140009
V KOFK CAIN ERRO 01 06 MW3 140071
V KOFK CAIN ERRO 01 06 MWS 140071
In Customer account assignment group and material account assignment groups. Setting is correct
in the IMG settings
IMG>Logistics general>Tax on Goods movements>India>Account determination.
What GL should be assign here
Excise G/L A/c for RG23A BED CENVAT offset account Mod.Clerng
ARE1
ARE3
DLFC ? ? ? ? ?
EWPO ? ? ? ? ?
GRPO
TR6C
UTLZ
Pl let me know if anything else is required to avoid further problems
Regards
SAPCOSolved. Thanks to....
http://www.vecna.com/whatWeDo/projects/9ias-experience.html -
Update table based on values from other table
Hi,
I am trying to update one table based on the values of another table. Since you can't use From in update statements, how do you execute this?
For example i have to tables, Table A and Table B. I want to update a column or columns in Table A based on another value in Table B:
So if the column in Table B was 1 then column in Table A would be Yes, if Table B was 2, then Table A would be Yes, if Table B was 3 then Table A would be N/A and so on...
Any help would be appreciated.
thanks,
scottSQL> select * from t1;
ID ST
1
2
3
SQL> select * from t2;
NO
1
2
3
4
SQL> update t1 set status=(select decode(no,1,'Y',2,'N','NA') from t2 where t1.id=t2.no);
3 rows updated.
SQL> select * from t1;
ID ST
1 Y
2 N
3 NA
Daljit Singh -
Error Updating Table with "Get Active UnitOfWork" Checked
Hi everyone.
I call invoke the a DB Adapter twice to update table in one BPEL, and so I have checked "Get Active UnitOfWork" so that each update can be persisted. I am seeing inconsistent results. What could be causing this?Hi, Have you checked the .jca source to make sure this value is indeed checked? Sometimes even when you check this option in the wizard it doesn't reflect in the source when you also perform a select operation: http://docs.oracle.com/cd/E12839_01/relnotes.1111/e10133/adapter.htm. Also are you using the xADataSource driver in the data source and the xADataSourceName ConnectionFactory property?
21.1.5.1 The Value Of the Active Unit Of Work Property Is Not Saved for Outbound SELECT Operation
While configuring an outbound Oracle Database Adapter to perform a SELECT operation, if you select Get Active Unit of Work in the Adapter Configuration Wizard - Advanced Option page, then the value of the GetActiveUnitofWork property is not saved in the .jca file.
The workaround for this issue is to manually add this property in the .jca file of the Oracle Database Adapter, as shown in the following example:
<property name="GetActiveUnitOfWork" value="true"/> -
Updating TABLEA based on values in TABLEB
Hi: I have the two following tables. I want to write a query which updates fields in TABLE1 based on certain values in TABLE2
1. Update SEVERITY in TABLE1 with SVRT_CD in TABLE2 for all TABLE1.INCIDENT = TABLE2.TKT_NBR
2. Update ESCALATION in TABLE1 with ESCL_LVL in TABLE2 for all TABLE1.INCIDENT = TABLE2.TKT_NBR
3. If the TABLE2.MNS_STATUS is 5 then set TABLE1.INCIDENTSTATUS='Acls' for all TABLE1.INCIDENT = TABLE2.TKT_NBR
4. If the TABLE2.MNS_STATUS is 4 then set TABLE1.INCIDENTSTATUS='Bctk' for all TABLE1.INCIDENT = TABLE2.TKT_NBR
remedy@MDS> descr TABLE1;
USERID NOT NULL VARCHAR2(32)
INCIDENT NOT NULL VARCHAR2(64)
INCIDENTSTATUS NULL VARCHAR2(16)
SEVERITY NULL NUMBER
ESCALATION NULL NUMBER
ONSTRAINT user_pk PRIMARY KEY (USERID,INCIDENT)
netcool@RMDSP02> describe TABLE2;
TKT_NBR NULL NUMBER(10,0)
ESCL_LVL NULL NUMBER(2,0)
SVRT_CD NULL VARCHAR2(1)
MNS_STATUS NULL NUMBER(1,0)
CONSTRAINT tkt_pk PRIMARY KEY (TKT_NBR)I think this will do what I want in #1 and #2. Can someone confirm?
UPDATE TABLE1
SET (SEVERITY, ESCALATION) = (SELECT SVRT_CD,ESCL_LVL from TABLE2 where to_number(TABLE1.INCIDENT) = TABLE2.TKT_NBR)Not sure how do I do the #3 and #4.
Thanks
RaviFor point 3 and 4 use decode. and dont forget to use EXISTS in your update.
UPDATE table1
SET (severity,
escalation,
incidentstatus) = (SELECT svrt_cd,
escl_lvl,
DECODE(mns_status,5,'Acls',4,'Bctk')
FROM table2
WHERE TO_NUMBER(table1.incident) = TABLE2.TKT_NBR)
WHERE EXISTS (SELECT NULL
FROM table2
WHERE TO_NUMBER(table1.incident) = TABLE2.TKT_NBR) Thanks,
Karthick. -
29875; error updating table with geometry but without index
hi,
I've a table with next description
AGGREGATEDUNIT_ID NOT NULL NUMBER(38)
DATASET_ID NUMBER(38)
GEOMETRY MDSYS.SDO_GEOMETRY
REDEFINEDMETADATA SYS.XMLTYPE
I dont need a spatial index in column GEOMETRY, but when I try an update operation:
INSERT INTO AGGREGATEDUNIT (AGGREGATEDUNIT_ID, DATASET_ID) VALUES (389, 893)
I get next error:
INSERT INTO AGGREGATEDUNIT
ERROR en lmnea 1:
ORA-29875: fallo al ejecutar la rutina ODCIINDEXINSERT
ORA-13203: fallo al leer la tabla USER_SDO_GEOM_METADATA
ORA-13203: fallo al leer la tabla USER_SDO_GEOM_METADATA
ORA-06512: en "MDSYS.SDO_INDEX_METHOD_9I", lmnea 183
ORA-06512: en lmnea 1
anybody knows?
thanxHi,
Whether you need the index or not, someone has created a spatial index on the table.
You can drop the index, or you can add the metadata for the table into user_sdo_geom_metadata (it was there at the time the index was created).
Hope this helps,
Dan -
I am getting Error while updating a table ..the error message is
JBO-29000: Unexpected exception caught javax.ejb.EJBException, msg=Transaction was rolled back. java.lang.NullPointerException; nested exception is java.lang.NullPointerException.
Transaction was rolled back: java.lang.NullPointerException; nested exception is java.lang.NullPointerException.
I have a CMP for a table. This beans use Data Transfer Objects also to retain the session values. To update the Database and also to fetch the value.
When updating from the form DTO gets updated..but not the actual table.
Can somebody let me know why and how to fix this
Thanks in advanceTransaction was rolled back: java.lang.NullPointerException
Is a value added for a NOT NULL column null? -
Error updating table with form
All i have setup a application using the tabular form, and i went through the wizard and now when the table comes up with the entries that i can change i get this error
Error in mru internal routine: ORA-20001: no data found in tabular form
Error Unable to process update.
OK
Even when i use the delete i get
ORA-20001: Error in multi row delete operation: row= 5, ORA-01403: no data found,
Error multi row operation failed
OK
And i am unable to update any rowsIt looks to me you wrongly selected the P-Key for the tabular form.
If you can provide some more information like the table columns, p-key etc we may help you out in debugging. -
Update table based on a select with a where clause
I am trying to update a table only for records where i have a status of changed.
Using the following code the update changes all the records putting in blank data if it is outwith the where clause.
ideas?
-- Update changed records
UPDATE IP_SURVEY_ACTIVITY_REG_NO old
SET (
old.SLPN,
old.SURVEY_DATE,
old.SEQUENTIAL_REF_NUMBER,
old.TOTAL_NUM_OF_SAMPLES,
old.TOTAL_NUM_OF_ASSOC_SAMPLES,
old.AIR_TESTS,
old.REMARKS,
old.SURVEY_DETAILS,
old.FURTHER_SURVEY_DETAILS,
old.GENERAL_COMMENTS) =
(SELECT
new.SLPN,
new.SURVEY_DATE,
new.SEQUENTIAL_REF_NUMBER,
new.TOTAL_NUM_OF_SAMPLES,
new.TOTAL_NUM_OF_ASSOC_SAMPLES,
new.AIR_TESTS,
new.REMARKS,
new.SURVEY_DETAILS,
new.FURTHER_SURVEY_DETAILS,
new.GENERAL_COMMENTS
FROM IP_SURVEY_ACTIVITY_REG_NO_INT new
WHERE new.load_id = v_load_id
AND new.status = 'CHANGED'
AND new.sarn = old.sarn);
cheers bjornThe EXISTS claue just needs to be added to your original query as a predicate on the ip_survey_activity_reg_no table. somethign like:
UPDATE ip_survey_activity_reg_no old
SET (old.slpn, old.survey_date, old.sequential_ref_number,
old.total_num_of_samples, old.total_num_of_assoc_samples,
old.air_tests, old.remarks, old.survey_details,
old.further_survey_details, old.general_comments) =
(SELECT new.slpn, new.survey_date,
new.sequential_ref_number,
new.total_num_of_samples,
new.total_num_of_assoc_samples, new.air_tests,
new.remarks, new.survey_details,
new.further_survey_details,new.general_comments
FROM ip_survey_activity_reg_no_int new
WHERE new.load_id = v_load_id and
new.status = 'CHANGED' and
new.sarn = old.sarn)
WHERE EXISTS (SELECT 1 FROM ip_survey_activity_reg_no_int new
WHERE new.load_id = v_load_id and
new.status = 'CHANGED' and
new.sarn = old.sarn)An updateable join view is similar, except you just join the two tables. Assuming that sarn is the primary key of ip_survey_activity_reg_no_int, or is at least declared as unique in that table, then the update of the join would look something like:
UPDATE (SELECT old.slpn oslpn, old.survey_date osurvey_date,
old.sequential_ref_number osequential_ref_number,
old.total_num_of_samples ototal_num_of_samples,
old.total_num_of_assoc_samples ototal_num_of_assoc_samples,
old.air_tests oair_tests, old.remarks oremarks,
old.survey_details osurvey_details,
old.further_survey_details ofurther_survey_details,
old.general_comments ogeneral_comments,
new.slpn nslpn, new.survey_date nsurvey_date,
new.sequential_ref_number nsequential_ref_number,
new.total_num_of_samples ntotal_num_of_samples,
new.total_num_of_assoc_samples ntotal_num_of_assoc_samples,
new.air_tests nair_tests, new.remarks nremarks,
new.survey_details nsurvey_details,
new.further_survey_details nfurther_survey_details,
new.general_comments ngeneral_comments
FROM ip_survey_activity_reg_no old, ip_survey_activity_reg_no_int new
WHERE new.sarn = old.sarn and
new.status = 'CHANGED' and
new.load_id = v_load_id)
SET oslpn = nslpn,
osurvey_date = nsurvey_date,
osequential_ref_number = nsequential_ref_number,
ototal_num_of_samples = ntotal_num_of_samples,
ototal_num_of_assoc_samples = ntotal_num_of_assoc_samples,
oair_tests = nair_tests,
oremarks = nremarks,
osurvey_details = nsurvey_details,
ofurther_survey_details = nfurther_survey_details,
ogeneral_comments = ngeneral_commentsHTH
John
Message was edited by:
John Spencer
Honest, Eric wasn't there when I posted :-) -
Updating tables based on Dates
In my application I use some tables with a date field.
table: employee
period date (e.g. 01-01-2004, 01-02-204, 01-03-2004)
target money
result money
table: project
date date (e.g. 15-01-2004, 20-01-2004, 03-02-2004)
revenue money
If I book a new project the table employee should be updated with result = result + revenue. If there is a new project on 15-01-2004 the record in employee where period = 01-01-2004 should be updated.
Can someone help me with a sample code for this problem?Assuming you have a block in the form call PROJ with fields DATE, REVENUE and EMP_NO. Also that a record exists for the employee and period date.
Create PRE-INSERT and PRE-UPDATE triggers on the block PROJ containing
begin
update employee
set result=result+:PROJ.REVENUE
where period_date=trunc(:PROJ.DATE,'Mon')
and emp_no=:PROJ.EMP_NO;
end
Maybe you are looking for
-
Korean language display problem
Most of the Korean language on my ipod touch display correctly, however some of it displays as strange combinations of characters that are not Korean such as apostrophes, upside down exclamation points, degree symbol, english letters with other count
-
Address book-multiple names in 1 entry
How do I add multiple names to one address card? For example, if a married couple has different last names, like John Smith and Jane Doe, when I try to enter in the name field it only lets me enter 1 last name and 1 first name.
-
MacBook Pro odd display issue, won't run anymore
This is a 2006 MacBook Pro 15" A1211 Intel core 2 duo 2.16 model. Diagnostics says nothing is wrong. The computer is no longer functional as it won't go beyond this screen. Any ideas what failed on this? Initially the odd video pattern was int
-
Send RFQ to Vendor with all its Attached documents
Hi, My requirement is to Develop Program which send(Email) RFQ data to Vendor along with all documents in attachment list of ME42. Standard solution: use ZENU output type but it do not send documents in attachment list. Your response is highly valuab
-
Role Change in R/3 not updating in CRM
Dear Experts, We have replicated Customers from R/3 to CRM Successfully. But according to Business Process, if the role a customer Change from Prospect to Sold-To in R/3 the change is not replicating to CRM. In fact the Role remain same as Prospect i