Updating JOIN tables in ALDSP Logical View
I've got a logical view which has 3 physical data services in it, representing relational tables in Oracle. The 3 tables are Person(Primary key=PersonID), Address (primary key=AddressID), and a JOIN table which contains PersonID and AddressID. I am able to successfully perform "gets" and "creates" using the logical view, however I have an issue when I try to UPDATE a person by adding a new address record. When I try this from the Test tab in the DSP Studio, I can see that the product inserts a new record to the Address table and then tries to insert a record into the PERSON_ADDRESS table, but it doesn't include the ADDRESS_ID column in the insert so it fails cause that is a non-null column.
Do you know if it is possible to do this? Has anyone had any experience with a similar situation? I attached a couple screenshots of the DSP logical view.
Any help would be appreciated.
Thanks,
Chris
Additional notes:
- The primary keys in the Person and Address table are autogenerated via a SEQUENCE. I have setup the physical services corresponding to each table such that the primary key is qualified as a Sequence column, and specified the Sequence name.
One additional note on this issue. When I test the Update method using the Test tab in ALDSP 3.0, if I specify an AddressId when adding a new Address, the process works fine and creates the Address record as well as the Person_Address record correctly. It seems that the issue only occurs when I leave the AddressId empty and let the process populate it using the Oracle SEQUENCE I specified on the physical Address (AddressId) service. When I leave it empty, the DSP correctly generates an AddressId and inserts it into the Address table, it just doesn't attempt to insert the new AddressId into the Person-Address record.
Similar Messages
-
I am beginner in MVC and I would like to create a view which populates two (or more) joined tables in a single view table as described below.
I have two tables:
1 - Bloggers: - bloggerID (int);
- bloggerName (string)
2 - Blogs: - blogID (int);
bloggerID (int);
- blogTitle (string);
- blogImage (string)
A blogger can have one or more blogs while one blog must be related to only one blogger.
I would like to have a view table on my webpage as the following:
Blogger Name
Blog Title
Blog Image
Noris Gang
Virus
virus.jpg
Noris Gang
Desktops
desktop.jpg
Gauthier
Books
books.png
John Leon
NNNMHJhjdhj
Nmbj.jpg
I'm using MVC 4 (or at least 3).
Thanks for your help.Hello,
From your description, it is not very clear that what you mean about the View, if it means the View concept in database as SQL Server, your required view should be as below:
Create view
as
Select Bloggers.bloggerName, Bloggers.blogTitle, Bloggers.blogImage
From Bloggers join Blogs on Bloggers.bloggerID = Blogs. bloggerID
If it means the UI view in MVC concept, I suggest you could ask it on the MVC forum:
http://forums.asp.net/1146.aspx
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Progammatic update a table with a database view in the page
Hi All,
I am using JDev 11g. With FOD database schema, I have one database view Products which comes from two tables Products_Base and Product_Transactions. I created three EOs (ProductEO, ProductsBaseEO, ProductTransactionsEO) and three VOs (ProductVO, ProductsBaseVO, ProductTransactionsVO) based on their EOs respectively.
Here is my scenario. I have an ADF form which is based on the database view Products and is dragged and dropped from Data Controls->ProductVO. When an existing record is submitted, a backing bean method will be called to update the data against the table Products_Base (and the table Product_Transactions at the same time) programmatically. An update method updateProductPrice() is added into the Application Module and published it to UI Client. The submit button in the page is created by directly dragging and dropping Data Controls->updateProductPrice into the page. When I run it, I got the following error message,
Failed to post data to database during "Update": SQL Statement "UPDATE PRODUCTS ProductEO SET COST_PRICE=:1 WHERE PRODUCT_ID=:2".
What I don't understand here is that, in my update method updateProductPrice(), it supposes to update the table Products_Base. But from the error, it appears that it is trying to update the view Products. Can anyone give me a help on what I did wrong here? When I try to debug it, it throws an exception to this line in the method updateProductPrice(),
getDBTransaction().commit();
Here are my codes,
The method which got called in the backing bean
public String cb6_action() {
DCBindingContainer bc = (DCBindingContainer)getBindings();
FacesCtrlAttrsBinding ProductId = (FacesCtrlAttrsBinding)bc.get("ProductId");
FacesCtrlAttrsBinding CostPrice = (FacesCtrlAttrsBinding)bc.get("CostPrice");
JUCtrlActionBinding action =
(JUCtrlActionBinding)bc.findCtrlBinding("updateProductPrice");
DCDataControl dc = action.getDataControl();
ApplicationModule am = (ApplicationModule)dc.getDataProvider();
AppModule service = (AppModule)am;
service.updateProductPrice(new Long(ProductId.toString()), CostPrice.toString());
return null;
public BindingContainer getBindings() {
return BindingContext.getCurrent().getCurrentBindingsEntry();
The update method defined in the Application module (AppModuleImpl.java)
public void updateProductPrice(long productId, String costPrice) {
ProductsBaseEOImpl product = retrieveProductById(productId);
if (product != null) {
try {
product.setCostPrice(new Number(costPrice));
getDBTransaction().commit();
catch (JboException ex) {
getDBTransaction().rollback();
throw ex;
catch (SQLException ex1) {
getDBTransaction().rollback();
private ProductsBaseEOImpl retrieveProductById(long productId) {
EntityDefImpl productDef = ProductsBaseEOImpl.getDefinitionObject();
Key productKey = ProductsBaseEOImpl.createPrimaryKey(new DBSequence(productId));
return (ProductsBaseEOImpl)productDef.findByPrimaryKey(getDBTransaction(),productKey);
Edited by: john wang on Oct 27, 2009 7:14 AMor
merge into test
using (select rowid rid
, id
, sub_id
, startdate
, lead (startdate) over (order by id, sub_id) - 1 ed
from test) x
on (x.rid = test.rowid)
when matched then
update set end_date = x.ed
; -
Updating a Table using grouping logic
Hi,
I have a requirement
There is table table_a
create table table_a
code number,
name varchar2(50),
city varchar2(50),
state varchar2(20),
group_id
insert into table_a
values
1,'ABC','A;,'A1');
insert into table_a
values
1,'BCD','A;,'A1');
insert into table_a
values
2,'ABC','A;,'A1');
insert into table_a
values
2,'ABE','A;,'A1');
insert into table_a
values
3,'ABF','A;,'A1');
insert into table_a
values
3,'ABH','A;,'A1');
I need to group the above table values
select code,name,city,dept from table_a
group by code,name,city,state
I need to update the table_a based on the groups above through a cursor
I want to update table_a
update table_a set group_id (based on the group valuse from the cursor)
How to approach for the scenario.Any suggestion for thisHi,
One last Query based on the Query you have posted:
If I go with the Updated Query
MERGE INTO table_a dst
USING (
SELECT name, city, state
, ROW_NUMBER () OVER (ORDER BY name, city, state)
AS group_id
FROM table_a
GROUP BY name, city, state
) src
ON ( dst.name || 'x' = src.name || 'x' -- CHANGED
AND dst.city || 'x' = src.city || 'x' -- CHANGED
AND dst.state || 'x' = src.state || 'x' -- CHANGED
WHEN MATCHED THEN UPDATE
SET dst.group_id = src.group_id
Now the Records are updated in the table With Group_id Column based on Grouping Logic thats fine
But if after some couple of days there might be new set of rows.Then How the Group values will be maintained?(The above group can contain new rows also.So how the table_a will be updated if there are already GROUP_ID values for example 1.2,3,4 etc)
SELECT name, city, state
, ROW_NUMBER () OVER (ORDER BY name, city, state)
AS group_id
FROM table_a
GROUP BY name, city, state -
Hi All,
I have a unique requirement where the data comes from two different sources using the following cases in perspective
- Table A and Table B have common ID's but different information regarding the same entity.
- Table A has the commanding records going into the target table and table B fills in some other details not available in table A.
so in essence I am merging data which can be accomplished by UPDATE/INSERT ....How ever I am constrained by the date element , data from table B merges in to the target table different for a given period of time , so what I have done is created a bunch of mappings just to update the table with the logic for the different years and I am using the UPDATE operator to update the records and mapping is taking a long time , just to update 122,360 records the mapping has been running for about 2 hours.
Any suggestions on how to better approach this?
Regards,
MalamHi Malam,
there is no simple answer to your question. Maybe SQL tuning is the most complex subject for relational databases.
For example of successful SQL tuning look at this thread Hanging deployment
Regards,
Oleg -
Am inserting only one table in a join table view
am in Jdeveloper 11.1.2.1.0
hi i have the following view am only able to insert in one table,which is SMS_PARTY_ADDRESS,am not able to insert to the othe join table which is property, my view is
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
xmlns="http://xmlns.oracle.com/bc4j"
Name="smsProp_partyAddress"
Version="11.1.2.60.81"
BindingStyle="OracleName"
CustomQuery="true"
PageIterMode="Full"
UseGlueCode="false">
<DesignTime>
<Attr Name="_isExpertMode" Value="true"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="sms1100.smsProp_partyAddress_LABEL"/>
</SchemaBasedProperties>
</Properties>
<ViewAccessor
Name="Sub_lov1"
ViewObjectName="sms1100.Sub_lov"
RowLevelBinds="true"/>
<ListBinding
Name="LOV_Town"
ListVOName="Sub_lov1"
ListRangeSize="-1"
ComboRowCountHint="10"
NullValueFlag="none"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Town"/>
</AttrArray>
<AttrArray Name="DerivedAttrNames">
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="TowId"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Town"/>
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="Id"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="Town"/>
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="DsdRegion"/>
<Item Value="ServiceDeliveryArea"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<SQLQuery><![CDATA[SELECT SmsPartyAddress.ADDRESS_LINE1,
SmsPartyAddress.ID,
SmsPartyAddress.ADDRESS_LINE2,
SmsPartyAddress.ADDRESS_LINE3,
SmsPartyAddress.ADDRESS_LINE4,
SmsPartyAddress.ADDRESS_TYPE_IND,
SmsPartyAddress.PAR_ID,
SmsPartyAddress.PROP_ID,
SmsPartyAddress.START_DT,
SmsProperties.TOW_ID,
SmsProperties.ID AS ID1,
SmsProperties.ADDRESS_LINE,
SmsProperties.ERF_NO,
SmsProperties.WAR_ID,
SmsProperties.ZONE,
DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
TOW.TOWN SUBURB,
POSTAL_CODE
FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
SMS_TOWNS TOW
,SMS_TOWNS TOW1
,SMS_POSTAL_CODES PCOD
WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID(+)
and TOW.PCOD_ID = PCOD.ID
AND TOW.TOW_ID = TOW1.ID (+)
--and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
and TOW.ID = SMSPROPERTIES.TOW_ID
and SmsPartyAddress.prop_id = SmsProperties.id
CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
<EntityUsage
Name="SmsPartyAddress"
Entity="sms1100.SmsPartyAddress"/>
<EntityUsage
Name="SmsProperties"
Entity="sms1100.SmsProperties"
Association="sms1100.proppaddAssociation"
AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
ReadOnly="true"
Reference="true"
DeleteParticipant="false"
JoinType="LEFT OUTER JOIN">
<DesignTime>
<AttrArray Name="_srcAttributes">
<Item Value="sms1100.SmsPartyAddress.PropId"/>
</AttrArray>
<AttrArray Name="_dstAttributes">
<Item Value="sms1100.SmsProperties.Id"/>
</AttrArray>
</DesignTime>
</EntityUsage>
<ViewAttribute
Name="AddressLine1"
PrecisionRule="true"
EntityAttrName="AddressLine1"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_LINE1"/>
<ViewAttribute
Name="Id"
IsUpdateable="while_insert"
PrecisionRule="true"
EntityAttrName="Id"
EntityUsage="SmsPartyAddress"
AliasName="ID"/>
<ViewAttribute
Name="AddressLine2"
PrecisionRule="true"
EntityAttrName="AddressLine2"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_LINE2"/>
<ViewAttribute
Name="AddressLine3"
PrecisionRule="true"
EntityAttrName="AddressLine3"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_LINE3"/>
<ViewAttribute
Name="AddressLine4"
PrecisionRule="true"
EntityAttrName="AddressLine4"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_LINE4"/>
<ViewAttribute
Name="AddressTypeInd"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="AddressTypeInd"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_TYPE_IND"/>
<ViewAttribute
Name="ParId"
PrecisionRule="true"
EntityAttrName="ParId"
EntityUsage="SmsPartyAddress"
AliasName="PAR_ID"/>
<ViewAttribute
Name="PropId"
PrecisionRule="true"
EntityAttrName="PropId"
EntityUsage="SmsPartyAddress"
AliasName="PROP_ID"/>
<ViewAttribute
Name="StartDt"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="StartDt"
EntityUsage="SmsPartyAddress"
AliasName="START_DT"/>
<ViewAttribute
Name="TowId"
PrecisionRule="true"
EntityAttrName="TowId"
IsUpdateable="true"
EntityUsage="SmsProperties"
AliasName="TOW_ID"
IsPersistent="true"/>
<ViewAttribute
Name="Id1"
IsUpdateable="while_insert"
PrecisionRule="true"
EntityAttrName="Id"
EntityUsage="SmsProperties"
AliasName="ID1"/>
<ViewAttribute
Name="AddressLine"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="AddressLine"
EntityUsage="SmsProperties"
AliasName="ADDRESS_LINE"/>
<ViewAttribute
Name="ErfNo"
IsUnique="true"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="ErfNo"
EntityUsage="SmsProperties"
AliasName="ERF_NO"/>
<ViewAttribute
Name="WarId"
PrecisionRule="true"
EntityAttrName="WarId"
EntityUsage="SmsProperties"
AliasName="WAR_ID"/>
<ViewAttribute
Name="Zone"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="Zone"
EntityUsage="SmsProperties"
AliasName="ZONE"/>
<ViewAttribute
Name="Town"
IsPersistent="false"
PrecisionRule="true"
Precision="60"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="TOWN"
Expression="TOWN"
SQLType="VARCHAR"
LOVName="LOV_Town">
<DesignTime>
<Attr Name="_DisplaySize" Value="60"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="combo_lov"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Suburb"
IsPersistent="false"
PrecisionRule="true"
Precision="60"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="SUBURB"
Expression="SUBURB"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="60"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="PostalCode"
IsPersistent="false"
PrecisionRule="true"
Precision="4"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="POSTAL_CODE"
Expression="POSTAL_CODE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="4"/>
</DesignTime>
</ViewAttribute>
<AttrArray Name="KeyAttributes">
<Item Value="Id"/>
</AttrArray>
<ResourceBundle>
<PropertiesBundle
PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
</ResourceBundle>
</ViewObject>i what to insert in both table partyAddress and propertyaddress,the property table the Updateable="never" and is disable,am not able to set is to alwaysuse this method but the column i still disable
<EntityUsage
Name="SmsProperties"
Entity="sms1100.SmsProperties"
Association="sms1100.proppaddAssociation"
AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
Reference="true"
ReadOnly="false"
DeleteParticipant="false"
JoinType="LEFT OUTER JOIN">
public class smsProp_partyAddressImpl extends ViewObjectImpl {
protected void create(AttributeList attributeList) {
// The view row will already have created "blank" entity instances
SmsPropertiesImpl newProperty = new SmsPropertiesImpl();
SmsPartyAddressImpl newPostal = new SmsPartyAddressImpl();
//SmsPropertiesViewImpl newProperty = getSmsPropertiesView2();
//SmsPartyAddressViewImpl newPostal = getSmsPartyAddressView1();
//SmsPropertiesImpl newProperty = getSmsPropertiesView2();
//SmsPartyAddressImpl newPostal = getSmsPartyAddressView1();
try {
// Let postal Address "blank" entity instance to do programmatic defaulting
newProperty.create(attributeList);
// Let postalAddress "blank" entity instance to do programmatic
// defaulting passing in new SmsPropertiesImpl instance so its attributes
// are available to the SmsPartyAddressImpl's create method.
newPostal.create(newProperty);
catch (JboException ex) {
newProperty.revert();
newPostal.revert();
throw ex;
catch (Exception otherEx) {
newProperty.revert();
newPostal.revert();
throw new RowCreateException(true /* EO Row? */,
"SmsProperties" /* EO Name */,
otherEx /* Details */);
}but the updatable="Always"
the view is
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
xmlns="http://xmlns.oracle.com/bc4j"
Name="smsProp_partyAddress"
Version="11.1.2.60.81"
BindingStyle="OracleName"
CustomQuery="true"
PageIterMode="Full"
UseGlueCode="false"
RowClass="sms1100.smsProp_partyAddressRowImpl"
ComponentClass="sms1100.smsProp_partyAddressImpl"
RowInterface="sms1100.common.smsProp_partyAddressRow"
ClientRowProxyName="sms1100.client.smsProp_partyAddressRowClient">
<DesignTime>
<Attr Name="_isExpertMode" Value="true"/>
<Attr Name="_codeGenFlag2" Value="Access|Coll|Prog|VarAccess"/>
<Attr Name="_isCodegen" Value="true"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="sms1100.smsProp_partyAddress_LABEL"/>
</SchemaBasedProperties>
</Properties>
<ViewAccessor
Name="Sub_lov1"
ViewObjectName="sms1100.Sub_lov"
RowLevelBinds="true"/>
<ListBinding
Name="LOV_Town"
ListVOName="Sub_lov1"
ListRangeSize="-1"
ComboRowCountHint="10"
NullValueFlag="none"
MRUCount="0">
<AttrArray Name="AttrNames">
<Item Value="Town"/>
</AttrArray>
<AttrArray Name="DerivedAttrNames">
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="TowId"/>
</AttrArray>
<AttrArray Name="ListAttrNames">
<Item Value="Town"/>
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="Id"/>
</AttrArray>
<AttrArray Name="ListDisplayAttrNames">
<Item Value="Town"/>
<Item Value="Suburb"/>
<Item Value="PostalCode"/>
<Item Value="DsdRegion"/>
<Item Value="ServiceDeliveryArea"/>
</AttrArray>
<DisplayCriteria/>
</ListBinding>
<SQLQuery><![CDATA[SELECT SmsPartyAddress.ADDRESS_LINE1,
SmsPartyAddress.ID,
SmsPartyAddress.ADDRESS_LINE2,
SmsPartyAddress.ADDRESS_LINE3,
SmsPartyAddress.ADDRESS_LINE4,
SmsPartyAddress.ADDRESS_TYPE_IND,
SmsPartyAddress.PAR_ID,
SmsPartyAddress.PROP_ID,
SmsPartyAddress.START_DT,
SmsProperties.TOW_ID,
SmsProperties.ID AS ID1,
SmsProperties.ADDRESS_LINE,
SmsProperties.ERF_NO,
SmsProperties.WAR_ID,
SmsProperties.ZONE,
DECODE(TOW1.TOWN,NULL,TOW.TOWN,TOW1.TOWN)TOWN ,
TOW.TOWN SUBURB,
POSTAL_CODE
FROM SMS_PARTY_ADDRESS SmsPartyAddress, SMS_PROPERTIES SmsProperties,
SMS_TOWNS TOW
,SMS_TOWNS TOW1
,SMS_POSTAL_CODES PCOD
WHERE SmsPartyAddress.PROP_ID = SmsProperties.ID(+)
and TOW.PCOD_ID = PCOD.ID
AND TOW.TOW_ID = TOW1.ID (+)
--and TOW1.ID = SMSPROPERTIES.TOW_ID(+)
and TOW.ID = SMSPROPERTIES.TOW_ID
and SmsPartyAddress.prop_id = SmsProperties.id
CONNECT BY PRIOR TOW.TOW_ID = TOW.ID]]></SQLQuery>
<EntityUsage
Name="SmsPartyAddress"
Entity="sms1100.SmsPartyAddress"/>
<EntityUsage
Name="SmsProperties"
Entity="sms1100.SmsProperties"
Association="sms1100.proppaddAssociation"
AssociationEnd="sms1100.proppaddAssociation.SmsProperties"
SourceUsage="sms1100.smsProp_partyAddress.SmsPartyAddress"
Reference="true"
ReadOnly="false"
DeleteParticipant="false"
JoinType="LEFT OUTER JOIN">
<DesignTime>
<AttrArray Name="_srcAttributes">
<Item Value="sms1100.SmsPartyAddress.PropId"/>
</AttrArray>
<AttrArray Name="_dstAttributes">
<Item Value="sms1100.SmsProperties.Id"/>
</AttrArray>
</DesignTime>
</EntityUsage>
<ViewAttribute
Name="AddressLine1"
PrecisionRule="true"
EntityAttrName="AddressLine1"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_LINE1"/>
<ViewAttribute
Name="Id"
IsUpdateable="while_insert"
PrecisionRule="true"
EntityAttrName="Id"
EntityUsage="SmsPartyAddress"
AliasName="ID"/>
<ViewAttribute
Name="AddressLine2"
PrecisionRule="true"
EntityAttrName="AddressLine2"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_LINE2"/>
<ViewAttribute
Name="AddressLine3"
PrecisionRule="true"
EntityAttrName="AddressLine3"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_LINE3"/>
<ViewAttribute
Name="AddressLine4"
PrecisionRule="true"
EntityAttrName="AddressLine4"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_LINE4"/>
<ViewAttribute
Name="AddressTypeInd"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="AddressTypeInd"
EntityUsage="SmsPartyAddress"
AliasName="ADDRESS_TYPE_IND"/>
<ViewAttribute
Name="ParId"
PrecisionRule="true"
EntityAttrName="ParId"
EntityUsage="SmsPartyAddress"
AliasName="PAR_ID"/>
<ViewAttribute
Name="PropId"
PrecisionRule="true"
EntityAttrName="PropId"
EntityUsage="SmsPartyAddress"
AliasName="PROP_ID"/>
<ViewAttribute
Name="StartDt"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="StartDt"
EntityUsage="SmsPartyAddress"
AliasName="START_DT"/>
<ViewAttribute
Name="TowId"
PrecisionRule="true"
EntityAttrName="TowId"
EntityUsage="SmsProperties"
AliasName="TOW_ID"/>
<ViewAttribute
Name="Id1"
IsUpdateable="while_insert"
PrecisionRule="true"
EntityAttrName="Id"
EntityUsage="SmsProperties"
AliasName="ID1"/>
<ViewAttribute
Name="AddressLine"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="AddressLine"
EntityUsage="SmsProperties"
AliasName="ADDRESS_LINE"/>
<ViewAttribute
Name="ErfNo"
IsUnique="true"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="ErfNo"
EntityUsage="SmsProperties"
AliasName="ERF_NO"/>
<ViewAttribute
Name="WarId"
PrecisionRule="true"
EntityAttrName="WarId"
EntityUsage="SmsProperties"
AliasName="WAR_ID"/>
<ViewAttribute
Name="Zone"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="Zone"
EntityUsage="SmsProperties"
AliasName="ZONE"/>
<ViewAttribute
Name="Town"
IsPersistent="false"
PrecisionRule="true"
Precision="60"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="TOWN"
Expression="TOWN"
SQLType="VARCHAR"
LOVName="LOV_Town">
<DesignTime>
<Attr Name="_DisplaySize" Value="60"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<CONTROLTYPE
Value="combo_lov"/>
</SchemaBasedProperties>
</Properties>
</ViewAttribute>
<ViewAttribute
Name="Suburb"
IsPersistent="false"
PrecisionRule="true"
Precision="60"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="SUBURB"
Expression="SUBURB"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="60"/>
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="PostalCode"
IsPersistent="false"
PrecisionRule="true"
Precision="4"
Type="java.lang.String"
ColumnType="VARCHAR2"
AliasName="POSTAL_CODE"
Expression="POSTAL_CODE"
SQLType="VARCHAR">
<DesignTime>
<Attr Name="_DisplaySize" Value="4"/>
</DesignTime>
</ViewAttribute>
<AttrArray Name="KeyAttributes">
<Item Value="Id"/>
</AttrArray>
<ResourceBundle>
<PropertiesBundle
PropertiesFile="SmsFrontService.SmsFrontServiceBundle"/>
</ResourceBundle>
</ViewObject>am also geting this error in my view after i set readOnly="false"
Remove updateable flag from entity usage or mark attributes as key attributes for this entity usage
i follow your link -
Adding a single table without a logical join to another table (OBIEE 10g)
Sometimes I want to just display a single table without a logical join to another table in the repository. However, everytime I move it to the Business Model and Mapping layer and perform a Global Consistency Check, it tells me that it needs a logical join and I am forced to create another table to join to it. Thus creating a dimension-fact relationship. There are times I don't need this relationship and just want to display some data. Is there anyway to get around this?
Thanks in advance!Yes,You have to create a join.You cannot take single table to BMM layer.You can create an alias of the table.Join this alias and base table through any common column and take both tables to BMM and desired table to presentation layer.
Another way is to create a view in physcial layer.Write a select statement like
Select primary_key from Table
Where primary_key is primary key of base table.Join this view ith base table and repeat the steps defined for Alias.
Regards,
Sandeep -
New View on WEBui to update z tables
Hi Friends,
I am new to webui and just getting into this.
I want to create a new view on webui, with some input fields( also with F4 values ),
I have 10 input fields on view and some have F4 values, just enter those values and there is a button SAVE, once this button is hit i wanted this data to be updated on Custom tables(2).
To do this, i got lost in the middle.
I think there are many ways to do this, bsp development and writing code on event handler calling FM to update, create a new BOL etc.
not sur which is the correct way, but i was just going BSP / FM way.
I went to bsp_wd_cmpwb, created a new comp, then create a new view with form type.
when i try to test this, this is giving me error on IE.
how to create all teh UI elements ??
could u pls help meout?
or does BOL creation is easy process to ahieve this ??
if yes could u pls help me how to do this
thanks alot in advance,
nirajaSince you said yours is a Form Type view, we can proceed this way. I did not try this, but it is worth using pointer. I used similar logic for a single field which was added on to a form view.
Once the Z view is created.
1. Create a Value Node.
In the method IF_BSP_MODEL~INIT of the Context node class, you can implement similar code like this based on the fields you like...
TYPES: BEGIN OF ltype_attr_struct,
abc TYPE abc,
END OF ltype_attr_struct.
super->if_bsp_model~init( id = id
owner = owner ).
DATA: lv_struct_ref TYPE REF TO ltype_attr_struct,
lv_value_node TYPE REF TO cl_bsp_wd_value_node,
lv_bo_coll TYPE REF TO if_bol_bo_col.
CREATE DATA lv_struct_ref.
CREATE OBJECT lv_value_node
EXPORTING
iv_data_ref = lv_struct_ref.
CREATE OBJECT lv_bo_coll
TYPE
cl_crm_bol_bo_col.
lv_bo_coll->add( lv_value_node ).
set_collection( lv_bo_coll ).
2. Add the button for the save in the toolbar.
3. Create an event handler for the save button. In the event handler
lr_node = me->typed_context->xxx->collection_wrapper->get_first( ).
lr_node->get_properties( Exporting ls_struct ).
update z table from ls_struct.
Regards,
Masood Imrani S. -
Manual update tables on 11g Logical Standby
Dear all,
I got one physical primary DB and one logical standby DB running 11.2.0.2 and SQL apply. Same configuration (32bit DB, same server spec) and same settings for both DB servers.
I don't know but for some reason, a table in the logical standby DB (which also exists in the primary DB) cannot be updated properly, a delete statement for a single row can end up generating ORA-4030 and there is no reason primary can complete the task but the logical cannot. Finally, I skipped the table in SQL apply.
As the table is a monthly statistics table computed from another daily statistics table, and it is so large that I dont want to re-instatiate the table via the network, nor re-program the queries.
Therefore I decide to trigger the computation on the logical side.
My question is, given that I skipped the table in SQL, will the manual update create trouble for the SQL apply process? I wonder how the redo procedure handles both tables under SQL apply and those under manual update.
BKNo!
One of the main benefits of a logical standby database would be the option of creating a local dataset.
See: ( Oracle® Data Guard Concepts and Administration 11g Release 2 (11.2) E10700-02 )
10.5 Customizing a Logical Standby Database
10.5.5 Adding or Re-Creating Tables On a Logical Standby Database
A materialized view may also be an option.
Best Regards
mseberg -
How to create a Maintenance view in order to update 4 tables
Hello,
I want to update 4 tables having the same key. MANDANT + SIRET (fiscal french ID).
I try to create a maintenace view, i need to update the 4 tables using a single screen.
When i use the relationship the system display a message "Relationships with unsuitable cardinality"
The first table contain only the ID, the 3 others contains some informations (adress, name, and others)
Thanks for your help
ChristopheHello,
you could check, if your other three tables have a correct foreign key definition on the field SIRET.
Tranaction SE11 -> pstion on the field and press the foreign key button.
Check Table has to be your first table; cardinality has to be 1 :1 or 1 to N.
Regards Wolfgang -
Hi,
what is the differnce between view and join tableHi,
There are 4 types of views in SAP.
Database View - To club more than one table
Projection View - To hide fields in one table
Maintenance View - To maintain database records in table
Help View - To provide help for a fields (Same functionality as Search help. This is outdated)
View are improves performance in the following aspects
1. If you want to use more than two table in 'JOIN' condition better to use Views . It will improves performance of a program
2. If you want to use mutiple FOR ALL ENTRIES clause, better to club all SELECT statement in a view.
Note:
1.Views does not contain data in it. It fetches data from the database only depending on the condition ...
2.Views are part of data dictionary. They are a window to view the data in database
3.views can be used to give security to data. users can be allowed to view only basic data only
For More Info,go thru this Threads,
join
Views vs Inner Join
Regards,
Padmam. -
Query and update a table/view
What is the best & fastest way to do this?
1) Put up a query input region for users to enter parameters.
2) Run a query on a table/view using those parameters.
3) Allow the output in (2) to be modified by user (multiple rows at a time) and then Submit the updates back to update th table/view
I can do (1) and (2) easily. How can I do (3)?
ThanksMake a report on the table. Go to the definition of
the report column and change the "Display As" type to
text field or select list or whcih ever is
applicable. Write a process on submit to insert these
values back to the table. You will have control over
which columns the user can modify.Thats a good idea and I was able to start on it. But how can my after submit process tell which rows to modify? i.e. what will my after submit process look like?
for rec in (....)
loop
update my_table set
end loop;
Help? Thanks -
How To Update A Table View From Client Side !!!!
Hi I would like to update a table view from the Client Side. So that the user can keep updating the relevent data on the client and when they have finally finished they can press Save so the entire page is then sent to the Server.
Does anyone know how to do this, I guess u have to use the EPCM, I have just started on it and would really appreciate some Help.
Thanks,
Emmanuel.This is what I found :-
There are a couple of ways to approach this.
1) load the excel spreadsheet into the database "as is". You can use interMedia
text to convert the .xls file into a .htm file (HTML) or use iFS (see
http://technet.oracle.com/
for
more info on that) to parse it as well. InterMedia text will convert your XLS
spreadsheet into a big HTML table (easy to parse out what you need at that
point)
2) Using OLE automation, a program you write can interact with Excel, request
data from a spreadsheet, and insert it. Oracle Forms is capable of doing this
for example as is other languages environments. In this fashion, you can remove
the "manual" and "sqlldr" parts -- your program can automatically insert the
data.
3) You can write a VB script that uses ODBC or Oracle Objects for OLE (OO4O) in
Excel. This VB script would be able to put selected data from the spreadsheet
into the database. We would recommend OO4O. It provides an In-Process COM
Automation Server that provides a set of COM Automation interfaces/objects for
connecting to Oracle database servers, executing queries and managing the
results. OO4O is available from
http://technet.oracle.com -
Insert, update and delete on updatable join views
Hi I need to insert, update and delete data in a views. I tried the foloing example
http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10739/views.htm#i1006232
We have two tables:
CREATE TABLE dept (
deptno NUMBER(4) PRIMARY KEY,
dname VARCHAR2(14),
loc VARCHAR2(13));
CREATE TABLE 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));
and one view:
CREATE VIEW emp_dept AS
SELECT emp.empno, emp.ename, emp.deptno, emp.sal, dept.dname, dept.loc
FROM emp, dept
WHERE emp.deptno = dept.deptno
AND dept.loc IN ('DALLAS', 'NEW YORK', 'BOSTON');
this update command works successfully
UPDATE emp_dept
SET sal = sal * 1.10
WHERE deptno = 10;
but this one fails because it attempts to modify the base dept table, and the dept table is not key preserved in the emp_dept view.:
UPDATE emp_dept
SET loc = 'BOSTON'
WHERE ename = 'SMITH';
I tried to create the view with "WITH CHECK OPTION" clause but whith no success :(
My question is: how can I do this with a simple across this view. I rather not use Instead Of Trigger because it take a lot of PL/SQL code :(
thanks in advance
OperatorUPDATE emp_dept
SET loc = 'BOSTON'
WHERE ename = 'SMITH';But that doesn't make sense. You cannot just LOC for SMITH, because LOC is not an attribute of EMP. If you change the LOC in the view then you must change it for all employees in DEPT 30 (or whatever).
The key preserved thing is merely about maintaining your data integrity.
I rather not use Instead Of Trigger because it take a lot of PL/SQL code :(The problem is, your business rule is not clear. Are you wanting to change the LOC for the DEPT record which is the DEPTNO to which SMITH belongs? Or are you wanting to change SMITH's DEPTNO to be the one for the BOSTON office?
Cheers, APC -
Can't update master table when creating a materialized view log.
Hi all,
I am facing a very strange issue when trying to update a table on which I have created a materialized view log (to enable downstream fast refresh of MV's). The database I am working on is 10.2.0.4. Here is my issue:
1. I can successfully update (via merge) a dimension table, call it TABLEA, with 100k updates. However when I create a materialized view log on TABLEA the merge statement hangs (I killed the query after leaving it to run for 8 hrs!). TABLEA has 11m records and has a number of indexes (bitmaps and btree) and constraints on it.
2. I then create a copy of TABLEA, call it TABLEB and re-created all the indexes and constraints that exist on TABLEA. I created a materialzied view log on TABLEB and ran the same update....the merge completed in under 5min!
The only difference between TABLEA and TABLEB is that the dimension TABLEA is referenced by a number of FACT tables (by FKs on the FACTS) however this surely should not cause a problem. I don't understand why the merge on TABLEA is not completing...even though it works fine on its copy TABLEB? I have tried rebuilding the indexes on TABLEA but this did not work.
Any help or ideas on this would be most appreciated.
Kind Regards
Mitesh
email: [email protected]Thats what I thought, the MVL will only read data that has changed since it was created and wont have the option to load in all the data as though it was made before the table was created.
From what I have read, the MVL is quicker than a Trigger and I have some free code that prooved to work from a MVL using it as a reference to know what records to update. There is not that much to a MVL, a record ID and type of update, New, Update or Delete.
I think what I will have to do is work on a the same principle for the MVL but use a Trigger as this way we can do a full reload if required at any point.
Many thanks for your help.
Maybe you are looking for
-
I need to uninstall and reinstall iTunes (it won't let me update). I have IE 8 on Windows XP, and iTunes 10 something. In my Program files list I see iTunes and iTunes (2) and even iPod and iPod (2) where a tech had to back up and do this for me befo
-
I got "activateFailure" when I tried to activate zoneset after I added new zonings. it says "fabricChange".
-
DWS variants for hours to be reduced for a particular leave
I have a scenario wherein leave type A and leave type B have same absence grouping say 2. But hours to be reduced for absence is different for two, say its 12 hrs for A and 10 hrs for B. Now if I assign rules for variants, it reads only 1st rule in s
-
What is that thing in front of a person's name whe...
Every time I'm on a group call there's always one person that has this symbol/thing in front of their names. I was just wondering what that is? Attachments: Screen Shot 2015-02-23 at 21.44.55.png 7 KB
-
Im using nikon D4, cs6 photoshop. camera raw plugin 7.3
I have updated all files. I can use .nef files from my D7000. but i am getting a message that file is not supported from my D4 .nef file. I have exhausted photoshop forums. any ideas?