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"/>
Similar Messages
-
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 -
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. -
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 -
Update table with data from dialog
Hello,
I need the problem.
I'm not update table with inputtext field where data change from dialog.
This metod is update table.
public void returnHandlerGoods(ReturnEvent returnEvent) {
// Add event code here...
ArrayList<PricatGoods> data = (ArrayList<PricatGoods>) returnEvent.getReturnValue();
BindingContainer bc = getBindings();
DCIteratorBinding dcIterBinding;
// сохранить изменения detail
dcIterBinding = (DCIteratorBinding) bindings.get("findVMIOrderDetailsIter");
RowSetIterator s = dcIterBinding.getRowSetIterator();
System.out.println("Получено товаров " + data.size());
for (int i =0; i < data.size(); i++){
Row detailRow = (RowImpl)s.createRow();
detailRow.setNewRowState(Row.STATUS_INITIALIZED);
s.insertRow(detailRow);
s.setCurrentRow(detailRow);
// detailRow.setAttribute("lineNum",createLineNum(i));
detailRow.setAttribute("gtin",((PricatGoods)data.get(i)).getGtin());
detailRow.setAttribute("goodId",((PricatGoods)data.get(i)).getGoodId());
detailRow.setAttribute("goodName",((PricatGoods)data.get(i)).getGoodName());
detailRow.setAttribute("sellerarticle",((PricatGoods)data.get(i)).getGoodCode());
detailRow.setAttribute("buyerarticle",((PricatGoods)data.get(i)).getBuyerArticle());
detailRow.setAttribute("unit",((PricatGoods)data.get(i)).getUnit());
detailRow.setAttribute("totalQuantity",0);
detailRow.setAttribute("acceptedQuantity",0);
detailRow.setAttribute("taxRate",((PricatGoods)data.get(i)).getVatPercent());
detailRow.setAttribute("price",((PricatGoods)data.get(i)).getCost());
detailRow.setAttribute("priceWithoutTax",((PricatGoods)data.get(i)).getCostWithoutVat());
detailRow.setAttribute("sumWithoutTax",0.0);
detailRow.setAttribute("totalSum",0.0);
detailRow.setAttribute("currency",((PricatGoods)data.get(i)).getCurrency());
System.out.println("Добавление товара \" "+((PricatGoods)data.get(i)).getGoodName()+ "\" с goodCode " +((PricatGoods)data.get(i)).getGoodCode());
s.closeRowSetIterator();
AdfFacesContext.getCurrentInstance().addPartialTarget(table2);
Fields are update good where inputText.readOnly = true.
Fields are not update good where inputText.readOnly = false. Old data duplicate in new row.
I have found some posts, but in them is not told accurately as I can solve the given problem.
How to update a adf table??
Re: ADF Dialog FrameWork-Table Update Problem
Whether it is possible to solve the given problem?
Thx,
DemaIf I use outputText that all job's a good. But I don't change these fields. I should have field with change for users.
Code jspx page for table ===>
<af:table value="#{bindings.findVMIOrderDetails1.collectionModel}"
var="row"
rows="#{bindings.findVMIOrderDetails1.rangeSize}"
first="#{bindings.findVMIOrderDetails1.rangeStart}"
emptyText="#{bindings.findVMIOrderDetails1.viewable ? 'Товаров пока нет.' : 'Access Denied.'}"
selectionState="#{bindings.findVMIOrderDetails1.collectionModel.selectedRow}"
selectionListener="#{bindings.findVMIOrderDetails1.collectionModel.makeCurrent}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.table2}"
id="table2" styleClass="baseTable">
<af:column sortProperty="lineNum" sortable="false"
headerText="№"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column19}"
id="column19">
<af:inputText value="#{row.lineNum}" simple="false"
required="true"
columns="4"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText4}"
id="inputText4" readOnly="false"
requiredMessageDetail='Поле "№" обязательно для заполнения'/>
</af:column>
<af:column sortProperty="gtin" sortable="false"
headerText="GTIN"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column20}"
id="column20">
<af:inputText value="#{row.gtin}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.gtin.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.gtin.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText26}"
id="inputText26" readOnly="true"/>
</af:column>
<af:column sortProperty="sellerarticle" sortable="false"
headerText="Код товара у поставщика"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column21}"
id="column21">
<af:inputText value="#{row.sellerarticle}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.sellerarticle.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.sellerarticle.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText27}"
id="inputText27" readOnly="true"/>
</af:column>
<af:column sortProperty="buyerarticle" sortable="false"
headerText="Код товара у покупателя"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column22}"
id="column22">
<af:inputText value="#{row.buyerarticle}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.buyerarticle.mandatory}"
columns="10"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText28}"
id="inputText28" readOnly="true"
disabled="false"/>
</af:column>
<af:column sortProperty="goodName" sortable="false"
headerText="Наименование"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column23}"
id="column23">
<af:inputText value="#{row.goodName}" simple="true"
required="true"
columns="11"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText29}"
id="inputText29"
requiredMessageDetail="Поле обязательно для заполнения"
readOnly="true"/>
</af:column>
<af:column sortProperty="itemDesc" sortable="false"
headerText="Описание"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column24}"
id="column24" rendered="false">
<af:inputText value="#{row.itemDesc}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.itemDesc.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.itemDesc.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText30}"
id="inputText30"/>
</af:column>
<af:column sortProperty="unit" sortable="false"
headerText="Ед. изм."
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column25}"
id="column25">
<af:inputText value="#{row.unit}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.unit.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.unit.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText31}"
id="inputText31" readOnly="true"/>
</af:column>
<af:column sortProperty="currency" sortable="false"
headerText="Валюта"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column26}"
id="column26" rendered="false">
<af:inputText value="#{row.currency}" simple="true"
required="#{bindings.findVMIOrderDetails1.attrDefs.currency.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.currency.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText32}"
id="inputText32"/>
</af:column>
<af:column sortProperty="totalQuantity" sortable="false"
headerText="Общее кол-во"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column27}"
id="column27">
<af:inputText value="#{row.totalQuantity}"
required="#{bindings.findVMIOrderDetails1.attrDefs.totalQuantity.mandatory}"
columns="#{bindings.findVMIOrderDetails1.attrHints.totalQuantity.displayWidth}"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText36}"
id="inputText36" readOnly="true">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.totalQuantity}"/>
</af:inputText>
</af:column>
<af:column sortProperty="acceptedQuantity" sortable="false"
headerText="Кол-во поставки"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column28}"
id="column28">
<af:inputText value="#{row.acceptedQuantity}"
required="true"
columns="7"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText37}"
id="inputText37"
requiredMessageDetail='Поле "Подтвержденное количество "обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.validatorQuantity}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.acceptedQuantity}"/>
</af:inputText>
</af:column>
<af:column sortProperty="taxRate" sortable="false"
headerText="НДС, %"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column29}"
id="column29">
<af:inputText value="#{row.taxRate}"
required="true"
columns="4"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText38}"
id="inputText38"
requiredMessageDetail='Поле "НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorNDS}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.taxRate}"/>
</af:inputText>
</af:column>
<af:column sortable="false" headerText="Цена"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column34}"
id="column34">
<af:column sortProperty="priceWithoutTax" sortable="false"
headerText="Без НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column31}"
id="column31">
<af:inputText value="#{row.priceWithoutTax}"
required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText40}"
id="inputText40"
requiredMessageDetail='Поле "Цена без НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorPriceWithoutTax}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.priceWithoutTax}"/>
</af:inputText>
</af:column>
<af:column sortProperty="price" sortable="false"
headerText="С НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column30}"
id="column30">
<af:inputText value="#{row.price}"
required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText39}"
id="inputText39"
requiredMessageDetail='Поле "Цена с НДС" обязательно для заполнения'
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorPrice}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.price}"/>
</af:inputText>
</af:column>
</af:column>
<af:column sortable="false" headerText="Сумма"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column35}"
id="column35">
<af:column sortProperty="sumWithoutTax" sortable="false"
headerText="Без НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column32}"
id="column32">
<af:inputText value="#{row.sumWithoutTax}"
required="true" columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText41}"
id="inputText41"
requiredMessageDetail='Поле "Сумма без НДС" обязательно для заполнения'
autoSubmit="true"
valueChangeListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.changeSum}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.sumWithoutTax}"/>
</af:inputText>
</af:column>
<af:column sortProperty="totalSum" sortable="false"
headerText="С НДС"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.column33}"
id="column33">
<af:inputText value="#{row.totalSum}" required="true"
columns="6"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.inputText42}"
id="inputText42"
requiredMessageDetail='Поле "Сумма с НДС" обязательно для заполнения'
autoSubmit="true"
valueChangeListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.changeSum}"
validator="#{backing_documents_outcoming_unprocessing_type_15_edit_01.unitValidatorTotalSum}"
readOnly="false">
<f:convertNumber groupingUsed="false"
pattern="#{bindings.findVMIOrderDetails1.formats.totalSum}"/>
</af:inputText>
</af:column>
</af:column>
<f:facet name="selection">
<af:tableSelectOne text="Select and"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.tableSelectOne2}"
id="tableSelectOne2">
<af:commandLink text="Удалить"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink5}"
id="commandLink5"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.deleteRow}"
styleClass="tableControlButton"
immediate="false"/>
</af:tableSelectOne>
</f:facet>
<f:facet name="actions">
<h:panelGroup binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.panelGroup2}"
id="panelGroup2">
<af:commandLink text="Добавить"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink6}"
id="commandLink6"
styleClass="tableControlButton"
immediate="false"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.addRows}"
useWindow="true" windowHeight="500"
windowWidth="600"
returnListener="#{backing_documents_outcoming_unprocessing_type_15_edit_01.returnHandlerGoods}"
rendered="#{bindings.JdDoctype02rspType.inputValue == 9&&bindings.JdDoctype02orderrspId.inputValue==null}"/>
<af:commandLink text="Пересчитать" id="commandLink31"
styleClass="tableControlButton"
binding="#{backing_documents_outcoming_unprocessing_type_15_edit_01.commandLink31}"
action="#{backing_documents_outcoming_unprocessing_type_15_edit_01.calc}"
useWindow="true" immediate="false">
<af:setActionListener from="#{row.rowKeyStr}"
to="#{processScope.mainRowKeyStr}"/>
</af:commandLink>
</h:panelGroup>
</f:facet>
</af:table> -
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 -
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 with select from another table
Hallo,
I'd like to update table b with codes from a mapping table a.
a has:
town_id, town_code, town_name
b has town_code, town_id, town_population, town_zip_code,...
Table a has all the details - town_id, town_code and town_name and acts as the mapping between town_id and town_code
In table b, town_code is null. I want to update the column b.town_code with town_code from table a where a.town_id = b.town_id.
How will the update query look like?
I tried
UPDATE B SET town_code = (SELECT A.town_code FROM A,B WHERE A.town_id=B.town_id)
and I get the error 'single-row subquery returns more than one row'
Will appreciate your assistanceThis is what I did.
First, I created and populated the TOWN_INFO table:
CREATE TABLE "TOWN_INFO"
( "TOWN_ID" NUMBER,
"TOWN_CODE" NUMBER,
"E_MAIL" CHAR(15 BYTE)
Table Created.
insert all
into TOWN_INFO (TOWN_ID, E_MAIL) values (3024,'[email protected]')
into TOWN_INFO (TOWN_ID, E_MAIL) values (3040,'[email protected]')
into TOWN_INFO (TOWN_ID, E_MAIL) values (3052,'[email protected]')
into TOWN_INFO (TOWN_ID, E_MAIL) values (3065,'[email protected]')
into TOWN_INFO (TOWN_ID, E_MAIL) values (3066,'[email protected]')
select * from dual
5 rows created.
The following creates and populates the mapping table:
CREATE TABLE "TOWN_MAPP"
( "TOWN_CODE" NUMBER,
"TOWN_ID" VARCHAR2(255 BYTE),
"TOWN_NAME" CHAR(6 BYTE)
insert all
into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3024,'1001','TOWN_1')
into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3040,'1003','TOWN_3')
into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3052,'1002','TOWN_2')
into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3065,'1004','TOWN_4')
into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3066,'1006','TOWN_6')
into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3088,'1007','TOWN_7')
into TOWN_MAPP (TOWN_ID,TOWN_CODE, TOWN_NAME) values (3020,'1009','TOWN_9')
select * from dual
7 rows created.
And now the update query:
UPDATE TOWN_INFO
SET TOWN_CODE=(SELECT B.TOWN_CODE FROM TOWN_MAPP B, TOWN_INFO C
WHERE B.TOWN_ID=B.TOWN_ID)
SET TOWN_CODE=(SELECT B.TOWN_CODE FROM TOWN_MAPP B, TOWN_INFO C
ERROR at line 2:
ORA-01427: single-row subquery returns more than one row
Thanx in advance
Edited by: user9954260 on Apr 13, 2010 7:40 AM
Edited by: user9954260 on Apr 13, 2010 7:44 AM -
Updating table with invalid identifiers
Hi!
I use a third-party plug in and that comparisons of chemical structures. I would like to update one table with values from another when the plug-in matches two rows. However, I am getting an invalid identifier problem.
Two tables:
PLATES: has VARCHAR2 columns of PLATE_SMILES, IN_DB
INVEST: has VARCHAR2 columns of SMILES
The operator is a binary one: jc_compare(PLATE_SMILES, SMILES)=1 (or 0 if they don't match)
I want my query to say: "If comparison of PLATE_SMILES, SMILES = 1, set IN_DB=1 for that row" - effectively asking if PLATE_SMILES exists in the INVEST table.
I've tried a number of renditions, all giving invalid identifiers. Here's an example:
update (select plate.PLATE_SMILES, plate.IN_DB, invest.SMILES
from PLATES plate
INVEST invest
WHERE jc_compare(PLATE_SMILES, SMILES)=1)
set plate.IN_DB = 1;
ORA-00904: "PLATE"."IN_DB": invalid identifier
I'm hoping this should be an easy fix, and any help is greatly appreciated!Hi,
You have
UPDATE (SELECT plate.plate_smiles,
plate.in_db,
invest.smiles
FROM plates plate, invest invest
WHERE jc_compare ( plate_smiles, smiles) = 1)
SET plate.in_db = 1; -- Error herePLATE is not known outside the inline view. Just remove it.
Regards
Peter -
Hi,
I have to update Table by reading Xml data.
I have written a procedure which is given below.
PROCEDURE Sp_Set_File_Permission
p_i_v_xml_data IN VARCHAR2,
Cur_Out_Col_Nm OUT Typ_Icon_Out
IS
XmlDataset XMLTYPE;
BEGIN
/* This is my xml
<xmldata>
<newdataset>
<fileid>99</fileid>
<add>TRUE</add>
<edit>TRUE</edit>
<del>FALSE</del>
<ex>FALSE</ex>
<im>TRUE</im>
</newdataset>
<newdataset>
<fileid>100</fileid>
<add>FALSE</add>
<edit>TRUE</edit>
<del>FALSE</del>
<ex>FALSE</ex>
<im>TRUE</im>
</newdataset>
</xmldata>*/
xmldataset := Xmltype.Createxml(p_i_v_Xml_Data);
--error occured on this line while executing procedure
FOR i IN (SELECT
Dt.Extract('//newdataset/fileid/text()').Getstringval() AS Fileid,
Dt.Extract('//newdataset/add/text()').Getstringval() AS Add,
Dt.Extract('//newdataset/edit/text()').Getstringval() AS Edit,
Dt.Extract('//newdataset/del/text()').Getstringval() AS d,
Dt.Extract('//newdataset/ex/text()').Getstringval() AS e,
Dt.Extract('//newdataset/im/text()').Getstringval() AS I
FROM TABLE(Xmlsequence( xmldataset.Extract('//xmldata/newdataset'))) Dt)
LOOP
UPDATE t_object_master
SET add_view=i.Add
,edit_view=i.Edit,
delete_view=i.D,
export_view=i.E,
import_view=i.I
WHERE objct_id=i.Fileid;
COMMIT;
END LOOP;
END Sp_Set_File_Permission;
When I am trying to exceute this procedure with the above mentioned xml ,getting error ORA-00923 ,FROM keyword not found where expected.
Please help me out in this.
Thanks,Something like this (no commit inside loop, no row per row)
create table t_object_master as
with myxml as (
select xmltype(
'<xmldata>
<newdataset>
<fileid>99</fileid>
<add>TRUE</add>
<edit>TRUE</edit>
<del>FALSE</del>
<ex>FALSE</ex>
<im>TRUE</im>
</newdataset>
<newdataset>
<fileid>100</fileid>
<add>FALSE</add>
<edit>TRUE</edit>
<del>FALSE</del>
<ex>FALSE</ex>
<im>TRUE</im>
</newdataset>
</xmldata>') doc from dual
select
fileid
,add_view
from
myxml
,xmltable('//newdataset'
passing myxml.doc
columns
Fileid number path 'fileid'
,add_view varchar2(5) path 'add'
table created
select
from t_object_master
FILEID
ADD_VIEW
99
TRUE
100
FALSE
update t_object_master t
set add_view = (
with myxml as (
select xmltype(
'<xmldata>
<newdataset>
<fileid>99</fileid>
<add>FALSE</add>
<edit>TRUE</edit>
<del>FALSE</del>
<ex>FALSE</ex>
<im>TRUE</im>
</newdataset>
<newdataset>
<fileid>100</fileid>
<add>TRUE</add>
<edit>TRUE</edit>
<del>FALSE</del>
<ex>FALSE</ex>
<im>TRUE</im>
</newdataset>
</xmldata>') doc from dual
, myextract as (
select
fileid
,add_view
from
myxml
,xmltable('//newdataset'
passing myxml.doc
columns
Fileid number path 'fileid'
,add_view varchar2(5) path 'add'
select
add_view
from myextract
where
fileid = t.fileid
select *
from t_object_master
FILEID
ADD_VIEW
99
FALSE
100
TRUE -
Errors Updating App with Application Loader
I have an app that I transfered in on itunes Connect and I am now trying to update it with a new version that I have created in Indesign.
The App version was 1.1 and the next version i want is version 2.0
Adobe have bumped up my app to version 2.0 for me so it shouldn't error when I try to udate it but I'm still getting errors when uploading the .zip file to the application loader. See screenshot...
Is there something I should have done once adobe bumped up the version?
I'm at a bit of a loss as to what to do next. Any Suggestions?Hi Neil,
Well, I'm experiencing the same problem as everyone.
We contacted gold support, and told us that it was a known issue and being investigated. The Bug number is 3632264. Any updates?
So, I tried tweaking App Loader and App Builder for the "version mismatch" and I think I solved it. However, the only problems left are the one's below. What do I do next?
Thanks! -
Partition exchange error on table with nested table
On Oracle 11.2.0.1, I have a partitioned table with some partitions that need to be 'archived' (in terms of moving partitions to an 'archive' table).
I have a source table like:
CREATE TABLE IS_PODACI245
ID_OBJEKTA_IDENTIFIKACIJA NUMBER(10),
ID_OBJEKTA NUMBER(20),
DATUM TIMESTAMP(6) NOT NULL,
TZ NUMBER(3),
DATA1 NUMBER(10),
DATA2 NUMBER(6),
DATA3 NUMBER(10),
DATA4 NUMBER,
DATA5 T_NTCIP_CLIMATE_TABLE
NESTED TABLE DATA5 STORE AS IS_PODACI245_STORE_TABLE
TABLESPACE DATA
PARTITION BY RANGE (DATUM)
PARTITION P_201107 VALUES LESS THAN (TIMESTAMP' 2011-08-01 00:00:00')
LOGGING
NOCOMPRESS
TABLESPACE DATA,
PARTITION P_MAXVALUE VALUES LESS THAN (MAXVALUE)
LOGGING
NOCOMPRESS
TABLESPACE DATA
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
CREATE INDEX IDX_IS_PODACI245_KOMPLEKS ON IS_PODACI245
(ID_OBJEKTA_IDENTIFIKACIJA, ID_OBJEKTA, DATUM)
TABLESPACE DATA
LOCAL (
PARTITION P_201107
LOGGING
NOCOMPRESS
TABLESPACE DATA,
PARTITION P_MAXVALUE
LOGGING
NOCOMPRESS
TABLESPACE DATA
NOPARALLEL;
CREATE OR REPLACE TYPE t_ntcip_climate_table as table of t_ntcip_climate_fmt;
CREATE OR REPLACE TYPE t_ntcip_climate_FMT as object
( dev_index number(6)
, dev_description varchar2(512)
, dev_type number(10)
, dev_status number(10)
, dev_mfr_status varchar2(512)
, dev_active number(3)
, dev_test_activation number(10)
/I would like to make exchange partition using stage table, and everything is going fine on all tables, but only on a few of them (listed source is one of them, and they're only tables with nested tables wihin), where I get an error.. but sometimes ;)
on a statement like:
ALTER TABLE IS_PODACI245_ARH EXCHANGE PARTITION P_201106 WITH TABLE IS_PODACI245_STAGE EXCLUDING INDEXES WITHOUT VALIDATION;I got an error:
ORA-00001: unique constraint (TXV.SYS_C0032911) violated
it's an unique index between parent and nested table.
what could cause that problem?Dear,
I suppose that the unique constraint
ORA-00001: unique constraint (TXV.SYS_C0032911) violatedis the one you 've created on the nested table IS_PODACI245_STORE_TABLE
If so, why not disable that constraint and try again.
I have never exchanged such a kind of partitioned table having a nested table in it. But, I could imagine that the cloned non partitioned table IS_PODACI245_STAGE should at least be the exact image of the partitioned table IS_PODACI245_ARH (of course without the partition part) but with the nested table part and including all indexes
In addition, if you have a parent/child relationship between your partitioned tables, then there is a chronological order of exchange starting by the child and then finishing by the parent
see the following link for more information about this order of exchange (and comment 2 for an example also)
http://jonathanlewis.wordpress.com/2006/12/10/drop-parent-partition/#more-65
Hope this helps
Mohamed Houri -
Help me to update table with condition's
this table is an alert table which will update when the sql server down , not pinging and drive space low.
Every 15 mins the monitoring system run. if the any issue came then it will update the information in this table. if the issue not solved by 15 mins the table will update again with the same details..
I would like update tickeraised = Y only on first time and if i got same issue less then 30 min the it should not change to Y.. based on server name , type and message.
min >10 and <20 min if any value is there then the table should not update with same value. can any one help me with tsql query...In future please post DDL and DML. For now I have created a scenario which will help you understand solution to your own requirement.
CREATE TABLE Tickets_Log(
Ticked_ID SMALLINT IDENTITY(1,1) PRIMARY KEY,
Ticket_Type VARCHAR(20) NOT NULL,
Log_Date DATETIME2 NOT NULL DEFAULT DATEADD(MINUTE,-15,GETDATE()),
Machine_Name VARCHAR(50) NOT NULL,
Message VARCHAR(100) NOT NULL,
Ticket_Status CHAR(2) NOT NULL DEFAULT 'N',
Update_Status SMALLINT DEFAULT 0)
INSERT Tickets_Log(Ticket_Type,Machine_Name,Message)
SELECT 'Pinging','HOD-400-651','Server Not Pinging' UNION
SELECT 'Low Drive Space','HOD-400-652','Drive Space Low' UNION
SELECT 'Connection','HOD-400-653','Unable to Connect to Server'
UPDATE TL
SET Log_Date=NewTickets.Log_Date,
Update_Status=1
FROM( SELECT 'Pinging' Ticket_Type,'HOD-400-651' Machine_Name,'Server Not Pinging' Message,GETDATE() Log_Date UNION
SELECT 'Pinging','HOD-400-653','Server Not Pinging',GETDATE() Log_Date) NewTickets
LEFT JOIN Tickets_Log TL ON NewTickets.Machine_Name=TL.Machine_Name AND NewTickets.Ticket_Type=TL.Ticket_Type
WHERE TL.Ticket_Type IS NOT NULL AND TL.Machine_Name IS NOT NULL AND DATEDIFF(MINUTE,TL.Log_Date,NewTickets.Log_Date)>=15 AND Update_Status=0
INSERT Tickets_Log(Ticket_Type,Machine_Name,Message,Log_Date)
SELECT NewTickets.*
FROM( SELECT 'Pinging' Ticket_Type,'HOD-400-651' Machine_Name,'Server Not Pinging' Message,GETDATE() Log_Date UNION
SELECT 'Pinging','HOD-400-653','Server Not Pinging',GETDATE() Log_Date) NewTickets
LEFT JOIN Tickets_Log TL ON NewTickets.Machine_Name=TL.Machine_Name AND NewTickets.Ticket_Type=TL.Ticket_Type
WHERE TL.Ticket_Type IS NULL AND TL.Machine_Name IS NULL
Chaos isn’t a pit. Chaos is a ladder. Many who try to climb it fail and never get to try again. The fall breaks them. And some are given a chance to climb, but they refuse. They cling to the realm, or the gods, or love. Illusions. Only the ladder is real.
The climb is all there is. -
Updating table with column NUMBER(6,2) causing concurrency exception in .NE
For info,
I try to update a table with a column defined as a NUMBER(6,2). I receive a concurrency exception.
If I resize this column as a NUMBER(8,2), every thing works well.
ByeI get the same problem. Changing from anything less than number(8,2) changes the vb datatype from single to double.
Apparently ODP.NET cannot handle the single datatype.
/Bj� -
Updating table with Modified date/time when updating any row
Hi guys,
What I am trying to do is this. I have a several rows in my table, alongwith the field 'Modified_date'. I want to insert a modified_date if and when I update the row in the table. Here's my code, but it's not working:
PROCEDURE ip_maint_save (p_submit IN VARCHAR2 DEFAULT NULL ,
p_user_no IN varchar_array_type,
p_user_id IN varchar_array_type,
p_ip_first IN varchar_array_type,
p_ip_last IN varchar_array_type,
p_user_type IN varchar_array_type,
p_user_language IN varchar_array_type,
p_blue_jays IN varchar_array_type,
p_created_by IN varchar_array_type,
p_modified_by IN varchar_array_type,
p_modified_date IN DATE := SYSDATE
IS
v_count_rec PLS_INTEGER := 0;
BEGIN
FOR i IN NVL (p_user_no.FIRST, 1) .. NVL (p_user_no.LAST, 0) LOOP
IF p_user_id (i) IS NOT NULL THEN
BEGIN
UPDATE IP_MAP
SET IP_FIRST = p_ip_first (i),
IP_LAST = p_ip_last (i),
USER_ID = p_user_id (i),
USER_TYPE = p_user_type (i),
USER_language = p_user_language (i),
IP_FIRST_number = Mr_Ip_Maint.ip_to_number (p_ip_first (i)),
IP_LAST_number = Mr_Ip_Maint.ip_to_number (p_ip_last (i)),
MODIFIED_DATE = p_modified_date (i)
WHERE USER_NO = p_user_no (i);
.....rest of the code/exceptions follow....
It's not working. Although, I am able to update a row, but it's not inserting/updating the modified_date field in the table for which the row is updated.
Thanks in advance.Hi,
As per my understanding, you are passing many values at a time to be updated using varchar_array_type type. In such scenario if your User_no is 100,101,102 all are being looped and the table is updated. But where are you checking the updated field or on what bases you will come to know that this particular field is updated.
I will suggest you to use before update triggers. As in triggers you can check the rows old and new value and then set sysdate for modified_date column.
Something like this,
create or replace trigger trg_IP_MAP on IP_MAP
before update
For Each Row
Begin
If (:OLD.IP_FIRST != :NEW.IP_FIRST OR
:OLD.IP_LAST != :NEW.USER_ID OR
:OLD.USER_TYPE != :NEW.USER_TYPE OR
:OLD.USER_language != :NEW.USER_language OR
:OLD.IP_FIRST_number !=:NEW.IP_FIRST_number OR
:OLD.IP_LAST_number != :NEW.IP_LAST_number) THEN
:NEW.MODIFIED_DATE = SYSDATE
END IF;
END;Twinkle
Maybe you are looking for
-
New iPhone 5s, cannot text or Face Time with my husband
My husband and I finally got iPhones (now that T-Mobile began offering them – we were able to hold out that long, unbelievable). Needless to say, this is a life changing acquisition. The problem we just discovered with our days-old phones is that whi
-
Corruption, crashing, signature dropping, duplicate mails sent omg
*First the facts:* . Mail folder (in Library) is almost 6GB (cringe), most of which (3.1GB) is used by one of my 5 pop mail accounts . envelope index is 33 MB Crashing: . Occasionally mail crashes and gives me the 'Mail has quit unexpectadly...do you
-
System to consider only regular vendors in rating
Dear Gurus, During vendor rating at present system is considering all vendors who were not supplied for entire quarter(say).ie, system now showing the vendors who supplied one time, un supplied vendors. but the requirement is system has to consider o
-
End of streaming audio clipped off
We have a long (nearly 15,000 frame) timeline with several different mp3 audio clips placed at various points with some animation. The audio is set to stream. In some places the last littlest bit of audio is getting clipped off when playedback. The a
-
Hi All, I have a scenario in which EDI IDoc needs to be converted to an ALE IDoc(Basic Type FIDCCP02 ) when sent through SAP-XI. I need ur help in the following areas : 1.Do I have to create the data type for sender ? 2.How should I mention the File