Performance issue in update new records from Ekko to my ztable
I'm doing changes to an existing program
In this program I need to update any new purchase orders created in EKKO-EBELN to my ztable-ebeln.
I need to update my ztable with the new records created on that particular date.
This is a daily running job.
This is the code I wrote and I'm getting 150,000 records into this loop and I'm getting performance issue, can Anyone suggest me how to avoid performance issue.
loop at tb_ekko.
at new ebeln.
read table tb_ztable with key ebeln = tb_ekko-ebeln binary search.
if sy-subrc <> 0.
tb_ztable-ebeln = tb_ekko-ebeln.
tb_ztable-zlimit = ' '.
insert ztable from tb_ztable.
endif.
endat.
endloop.
Thanks
Hema.
Modify your code as follows:
loop at tb_ekko.
at new ebeln.
read table tb_ztable with key ebeln = tb_ekko-ebeln binary search.
if sy-subrc <> 0.
tb_ztable_new-ebeln = tb_ekko-ebeln.
tb_ztable_new-zlimit = ' '.
append tb_ztable_new.
clear tb_ztable_new.
endif.
endat.
endloop.
insert ztable from table tb_ztable_new.
Regards,
ravi
Similar Messages
-
Update multiple records from a list
Just trying to find some tutorials on how to update multiple
records from 1
page of checkboxes
easiest example is hotmail
i would like to be able to give my clients the ability to
delete or update
multiple records from 1 page... mind you that this type of
update woudl only
be for simple status changes, flags that need to be changed
and so on...
Delete... well if they made it to this page they are already
sure and have
been warned that they are going to delete the records..
where can i find such a tutorial on how to complete multiple
record updates
or deletes from 1 form...
thanksServer model and software below.
And hotmail has nothing to do with anything.. its an example
of what i would
like to be able to do...
If you log into hotmail. you have the option to check all the
emails you
want to delete.
well thats what i want to do with my clients sites...
Each record would have its own checkbox, they select the
records they want
to delete or update and they hit submit to process there
request.
Using ASP, SQL2005 and DW8
"bregent" <[email protected]> wrote in
message
news:f21upb$nop$[email protected]..
> >Just trying to find some tutorials on how to update
multiple records from
> >1
>>page of checkboxes
>
> What server model?
>
>>easiest example is hotmail
>
> What does hotmail have to do with this. -
Unique data record means you can't update a record from ECC with same key.
Unique data record means you can't update a record from ECC with same key fileds right?
Details: For example i have two requests Req1 and Req2 in DSO with unique data record setting checked. on day one Req1 has a filed quantity with value 10 in Active data table. On day two Req1 can not be overwitten from ECC with Req2 with the same key fields but different value 20 in the filed quantity because of the Unique data record settings. finally the delta load fails from ECC going to DSO because of this setting. is it right?
I think we can only use unique record setting going from DSO to cube right?
Please give me a simple scenario in which we can use this setting.
I already search the threads and will assign points only to valuable information.
Thanks in advance.
YorkHi Les,
Unique Data Records:
With the Unique Data Records indicator, you determine whether only unique data records are to be updated to the ODS object. This means that you cannot load a data record into the ODS object the key combination for which already exists in the system otherwise a termination occurs. Only use this setting when you are sure that only unique data records are to be loaded into the ODS object (for example, single documents). A typical application of this is in the loading of mass data. It improves the load performance.
Hope it Helps
Srini -
Ipod will not update new songs from itunes
My ipod will not update new songs from itunes. I've purchased several songs from the music store, updated my playlists and as added some from my CD collection and they are not transfering from my library to my ipod.
I've tried numerous configurations under the preferences - ipod menue but still can't get them to transfer.
One error I occasionally get is "ipod cannot be updated because there is not enough free space to hold all of the songs in the itunes music library"
There is plenty of room on my ipod so I can't figure out why. It almost seems as if it is trying to copy all of my songs not just the new ones because all songs in my librbary are checked.Thank you for responding.
Doesn't it have to be on either manual or auto update? What other option is there?
I will try downloading latest updates.
I know it will work if I reset it (have done it a few times already). I just hate having to restore factory settings everytime I want to put a new song onthe ipod. -
Update new records and delete old record? Urgent
Iam updating some records from internal table to Data base table.
Please suggest me
INSERT DBTable FROM TABLE itab.
UPDATE DBTable FROM itab.
Delete existing records.
DELETE DBTable FROM TABLE itab_old.
Please suggest meGot you..
Iam colecting some records to internal table from Data base table
based on year and month.
Then changing the date and months in interenla table
then inserrting this modified records of internal table into datta base table.
Finaly delete the old records with old dates.
Here is the suggestion..This is a logic and not the exact code..
DATA: ITAB TYPE STANDARD TABLE OF ZTABLE WITH HEADER LINE.
DATA: ITAB_OLD TYPE STANDARD TABLE OF ZTABLE WITH HEADER LINE.
SELECT * FROM ZTABLE
INTO TABLE ITAB.
ITAB_OLD = ITAB.
ITAB-NEW_DATE = SY-DATUM.
MODIFY ITAB TRANPORTING NEW_DATE WHERE KEY_FIELD = 'DS'.
Deletion part.
DELETE ZTABLE FROM TABLE ITAB_OLD.
Insertion part
INSERT ZTABLE FROM TABLE ITAB.
Thanks,
Naren -
Restore new iPad Mini from iPad 1 backup. Ican update new apps from Apple store but most of my apps have been showing the Waiting status for over 12 hours. Store shows them as installed. What gives?
If the downloads are stalled or "waiting" - try these suggestions.
Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
Make sure that you do not have a stalled download in iTunes - a song or podcast .... if you have a download in there that did not finish, complete that one first. Only one thing can download at a time on the iPad so that could be what is causing the problem.
If that doesn't work - sign out of your account, restart the iPad and then sign in again.
Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
Go back to Settings>iTunes & App Store>Sign in and then try to update again. Tap one waiting icon only if necessary to start the download stream.
You can also try deleting the waiting icons - tap and hold down on an icon until it wiggles - the tap the X on the icon to delete it. Then try to download again.
You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your app preferences and device settings again.
If all else fails, download the updates or the apps in iTunes on your computer and then sync the content to your iPad. -
Update/Insert records from Oracle to MySQL
Hi team,
My application will insert/update records into Oracle database, I need to sync all of records into MySQL database. I designed a package to load data from Oracle to MySQL, the Oracle database use OLE DB component and MySQL database use ADO.NET.
How to insert new records into MySQL? If the old record exists, we also need to replace with new record. I did some research, someone suggest to create a stage table to handle this scenario, but I have 14 tables in this case. How to handle this scenario
with high performance?
If there is anything unclear, please let me know.
Thank you in advance.Finally, I created 14 tables as same as in our MySQL database system with prefix "updated" , they are use to store the updated records from Oracle system. All of new records we add a flag, the "1" means insert a new record into the system,
and the "0" means we should updated. So, I can use the conditional split component to split all of new records. The new records insert into the target table and the updated records insert into the "updated_table". Finally, we can add a
SQL Script task to run a update script to sync all of records.
I don't use Lookup Transformation because we must use Cache
Transform transformation in this case, the Cache connection manager to save the data to a cache file (.caw), it will hard to
trace the history data in the future.
In addition, I recommend to use ODBC connection if somebody face the similar scenario with me, there is a bug if we use ADO.NET to
load data from Oracle to MySQL by using SSIS. For more information, please refer the MSDN document: http://blogs.msdn.com/b/mattm/archive/2009/01/07/writing-to-a-mysql-database-from-ssis.aspx
@Arthur, thanks again for your input. Have a nice day! :) -
Getting timeout error while updating a record from c#
Hi,
I have around 30k records in a tables. When I update that record inside the Transaction (Enterprise Data Library, c#) , it takes long time and throws timeout error.
But I am able to update the same record via Toad.
In the morning I tried same updating the record, it works without any change in the code or script.+
is it due table lock or db related issue? please adivse, how to resolve if occurs again.
anandCode:
private static void Save()
using (DBTransactionManager dbTransactionManager = new DBTransactionManager())
try
DataTableDAL.Instance.ExecuteDML("Update Voyage SET BallastBonus = 30000 WHERE ID = 'AE53B610BEA743EC8AFBAED0C8349BF8';");
//commit database
dbTransactionManager.Commit();
catch
dbTransactionManager.RollBack();
throw;
Table
Column Name ID Pk Null? Data Type Default Histogram Encryption Alg Salt
ID 1 1 N NVARCHAR2 (32) None
CALCNUMBER 2 N NUMBER (10) None
CURRENCYID 3 N NVARCHAR2 (32) Frequency
CALCTYPE 4 N NUMBER (5) Frequency
ESTIMATEDESCRIPTION 5 Y NVARCHAR2 (200) None
ESTIMATEGROUPDESCRIPTION 6 Y NVARCHAR2 (200) None
BALLASTBONUS 7 Y NUMBER (12,2) None
BALLASTBONUSCOMMPCT 8 Y NUMBER (6,3) None
ISESTIMATE 9 N NUMBER (1) None
ADDITIONALSTEAMVALUE 10 Y NUMBER (8,4) None
ISADDITIONALSTEAMPCT 11 Y NUMBER (1) None
ADDITIONALPORTVALUE 12 Y NUMBER (8,4) None
ISADDITIONALPORTPCT 13 Y NUMBER (1) None
CREATEDBY 14 N NVARCHAR2 (32) Frequency
CREATEDDATE 15 N DATE None
UPDATEDBY 16 Y NVARCHAR2 (32) None
UPDATEDDATE 17 Y DATE None
LUMPSUMCARGOCOST 18 Y NUMBER (1) None
BUNKERPRICEMETHOD 19 Y VARCHAR2 (30 Byte) None
INCCONTCALCRESULT 20 Y NUMBER (1) None
FINAL_EST 21 Y NUMBER None
SPOT_VOYAGE 22 Y NUMBER (1) None
ISRUNCOSTEDIT 23 Y NUMBER (1) None
Index
Table doesnt have any index, except primary key index.
Total Records
35,000
Hope this input might sufficient to help me. -
Performance issue with brand new intel iMac extreme
I am at a loss to explain a problem I've been having and I thought I might put it out to you guys.
In September I purchased a macbook Pro (2.4 ghz, 4 GB RAM) to use in video editing with Final Cut Pro, and for the most part I've been thrilled. I use 1TB LaCie external drives connected via FW800, and perform Multiclip editing with 4-5 video streams at a time and only on occasion have dropped frames during the editing process.
In December I determined that I needed to have an additional system, and thought a 2.8Ghz Intel iMac extreme would be an excellent choice, since for the same price I could get a little more power in the processor, more hard drive space and a bigger screen to work on. When we picked up the new system in the store (The Grove Apple Store in LA), we had them upgrade the memory to 4GB.
Since day one we have had performance issues, including problems playing streaming and DVD video, severe delays mounting and unmounting drives (firewire and USB) and application images, and freezing while doing even simple tasks like printing or checking email. These problems occur even while there are no external drives are connected. I have none of these issues with the Macbook Pro, which has virtually an identical set of programs installed, and both running the same version of Leopard.
I already took the original iMac back to the store, and they exchanged it, but did not have 4GB sets of RAM in stock so they took the RAM from the original machine and put it in the new one. They said if I continued to have problems then it was most likely the RAM and I should come back when they got more in stock. I DID have the same problems with the new machine, and took it back to the Apple Store and they swapped the memory. It seemed to improve the issue, but now I'm seeing the same severe performance issues again.
All tech support can do is tell me to do a PRAM reset, which seems to improve things very temporarily (but that may be my imagination) or have me restart, which at least has the ability to make the printing of documents capable.
What I'm wondering is if it is likely that the RAM is the issue and I just got another bad batch, or if the iMac has some weird glitch that isn't present in the macbook Pro...?? Or could I have possibly gotten 2 bad systems in a row? It's extremely frustrating, and I KNOW it shouldn't be this way! It's so bad I get better performance out of my single-core G5 tower! How do I get a good working system that operates like it should? Am I better off getting another Macbook Pro? I'd rather not for several reasons...
I have xbench on both the MBP and the iMac and can provide test numbers if they'll help, as well as any other info.
Thank you so much for reading my novella of a post and also for any insight you have!
Best,
TravisHi!
I got the same problem with my MacBook when it still was new in may 2006. It was supposed to be one of the faster Laptops around but it was soooo slow it drove me nuts. I can only advise to have a look if there is something hugging up your RAM and run some tests using these programs on your machine:
Xbench:
http://www.macupdate.com/info.php/id/10081
MenuMeters:
http://www.macupdate.com/info.php/id/10451
If they show any unusual results you might have your problem...
As to my problem with the MacBook: I did a complete re-install (writing the harddisk over with zeroes) and suddenly everything was just fine. (But be sure to back all your files before that, I learned this one the hard way.) I know it is just a standard answer, but it worked out for me this time...
Hope this helps in some ways.
Cheers,
Rene -
Form does not show "new" records from SQL Database
I have a PDF form that pulls data from a SQL Server. The fields in
the PDF are populated from the database after selecting a specific
record from a drop down and then clicking on a button labeled "Fill".
The problem is that the dropdown does not display new records that
have been recently added to the database. I have to open the form up
in designer then save it, (*note - I change nothing at this point.)
Then when the form is opened back up in Adobe the dropdown show all
the records including the new ones. I even put a manual refresh on
form to try and fix this an it did not help. Seriously stumped.
Any help is greatly appreciated.
Here is my code for the dropdown.
++++++++++++++++++++++++++++
topmostSubform.Page1.JobSelect::initialize - (JavaScript, client)
var sDataConnectionName = "BBCC"; // example - var sDataConnectionName
= "Test";
var sColHiddenValue = "ContractAdmin_Key"; // example - var
sColHiddenValue = "Dept_ID";
var sColDisplayText = "JobDescription"; // example - var
sColDisplayText = "Dept_ID"
// Search for sourceSet node which matchs the DataConnection name
var nIndex = 0;
while(xfa.sourceSet.nodes.item(nIndex).name != sDataConnectionName)
nIndex++;
var oDB = xfa.sourceSet.nodes.item(nIndex);
oDB.open();
oDB.first();
// Search node with the class name "command"
var nDBIndex = 0;
while(oDB.nodes.item(nDBIndex).className != "command")
nDBIndex++;
// Backup the original settings before assigning BOF and EOF to stay
var sBOFBackup =
oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");
var sEOFBackup =
oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");
oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayBOF",
"bofAction");
oDB.nodes.item(nDBIndex).query.recordSet.setAttribute("stayEOF",
"eofAction");
// Clear the list
this.clearItems();
// Search for the record node with the matching Data Connection name
nIndex = 0;
while(xfa.record.nodes.item(nIndex).name != sDataConnectionName)
nIndex++;
var oRecord = xfa.record.nodes.item(nIndex);
// Find the value node
var oValueNode = null;
var oTextNode = null;
for(var nColIndex = 0; nColIndex < oRecord.nodes.length; nColIndex++)
{ if(oRecord.nodes.item(nColIndex).name == sColHiddenValue)
{ oValueNode = oRecord.nodes.item(nColIndex); } else
if(oRecord.nodes.item(nColIndex).name == sColDisplayText) { oTextNode
= oRecord.nodes.item(nColIndex); } }
while(!oDB.isEOF())
this.addItem(oTextNode.value, oValueNode.value);
oDB.next();
// Restore the original settings
oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sBOFBackup,
"bofAction");
oDB.nodes.item(nDBIndex).query.recordSet.setAttribute(sEOFBackup,
"eofAction");
// Close connection
oDB.close();
++++++++++++++++++++++
Here is code for the refresh button
+++++++++++++++++++++
topmostSubform.Page1.Button27::click - (JavaScript, client)
sourceSet.BBCC.requery();
+++++++++++++++++++++pguerett wrote:
The other thing that might be happening is a refresh issue on the DropDownList. Try adding the command xfa.layout.relayout() after the database connection has been closed.
Paul
Good catch Paul! Would you believe that I have been trying to get this resolved for almost two years! Works perfect now.
Thank you,
- Eric -
Update new record in database table
I'm working with TestStand 4.2 and MySQL database with user-defined tables.
There is "test_results" table with autoincrement "id" (primary index).
I want to:
1. write a new record to the test_results table - some data and status "Running"
2. run a test (pass to a test sequence its "id", test uses this id for writing data to database)
3. update the record: set execution time and update status.
So, the steps are as below:
1. Open database
2. Open SQL statement: "select * from test_results".
3. Data Operation: operation - "Set and Put", record to operate on - "New - Create New Record". In the "Column/Parameter Values" tab I set the new record values.
Here I want to retrieve the new record "id". How to do it?
Thanks in advance.I am not sure how to implement this in Test Stand, but from an SQL programming perspective, you want to run:
SELECT @@IDENTITY
Here is a link to the description: http://msdn.microsoft.com/en-us/library/ms187342.aspx
It will retrieve the record ID of the row you just inserted. -
Updating multiple records from single form (ASP)
I have a nested repeat region.
I have created in the parent, a form with 3 fields and an update button.
the child records all have multiple columns, 3 of which correspond to the parent.
Athe parent is bound to the child records by the shipmentID
I need to be able to update all child records from the form in the parent.
The case is this.
The child records are orders with shipdates and frequencies
The parent contains a form with fields for shipdate and frequency
The administrator needs to change the shipdate and/or frequency for all child records.
(The child records are forms as well--but that's another issue that works fine)
Shipment ID
Date Field
Freq Field
UPDATE Button
ShipmentID
Record 1
Data case1
Date
ShipmentID
Record 2
Data case 2
Date
I am doing this in classic asp with an SQL database.
So how do I get the form to update all record
[Subject title edited by moderator to make clear ASP involved]Hi,
This is one of those questions that would require far more explanation that is reasonable to expect in a forum. You should do a little poking around in the nearest Barnes & Nobles. About a half hour in a chare with a good ASP book and vanilla latte should have you on the right track.
Lawrence *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF -
Issue editing a new record in simple ADF form
I have a simple ADF entry form and table that saves to a database table. The database table has columns that cannot have null values.
I can create, edit, delete and save rows in the ADF form without problems.
The problem I have is when I edit a row that I just created and saved. I get an error message that says I cannot save null into the fields that cannot have null values in the database, even though my form shows that my newly created and saved is data there. I seem to have to edit those fields to get the model entity to recognize that there is some value in them.
So the sequence of events leading to the error is this:
I create a new record with ADF form using the 'Create' or 'CreateInsert' operation command button, I enter data into all the fields and hit commit.
I decide I want to make a change to one of the fields, I enter some text, click commit again and an error message pops up saying that I cannot enter null into a required field, but there is data in the field and I did not change anything in it.
The only way I can save without error now is either by running a rollback operation now or making a edit to all the required fields to get the linked entity to not send a null value to the database.
This error will still occur even if I navigate away from the newly created record to other records, if I ever navigate back to that record created in the current session, I will get that error message.
Anyone else experience a similar problem?
Are there any settings or properties I need to set in the entity that can avoid sending null values to the database when a value already exists?
I thought at first it was because I'm using the 'CreateInsert' operation to create a new record as opposed to the 'Create' operation, but the same problem exists with both operations.I am using jDev version 11.1.2.1.0
In you sample, does your database have columns that require a not null value?
I think my problem lies in the entity or view somewhere, how it's sending null value for fields that don't need to be updated.
Here's the source for my entity and view.
Entity:
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
<!---->
<Entity
xmlns="http://xmlns.oracle.com/bc4j"
Name="Feedback"
Version="11.1.2.60.81"
DBObjectType="table"
DBObjectName="FEEDBACK"
AliasName="Feedback"
BindingStyle="OracleName"
UseGlueCode="false">
<Attribute
Name="FeedbackId"
Precision="10"
Scale="0"
ColumnName="FEEDBACK_ID"
SQLType="NUMERIC"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
TableName="FEEDBACK"
PrimaryKey="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="22"/>
</DesignTime>
</Attribute>
<Attribute
Name="PageName"
IsNotNull="true"
Precision="200"
ColumnName="PAGE_NAME"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK"
IsUpdateable="while_insert"
RetrievedOnInsert="true"
RetrievedOnUpdate="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="200"/>
</DesignTime>
</Attribute>
<Attribute
Name="Severity"
Precision="30"
ColumnName="SEVERITY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK"
IsNotNull="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Attribute
Name="InternalAction"
Precision="30"
ColumnName="INTERNAL_ACTION"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Attribute
Name="FeedbackNote"
IsNotNull="true"
Precision="4000"
ColumnName="FEEDBACK_NOTE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="4000"/>
</DesignTime>
</Attribute>
<Attribute
Name="InternalNote"
Precision="4000"
ColumnName="INTERNAL_NOTE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="4000"/>
</DesignTime>
</Attribute>
<Attribute
Name="CreatedBy"
Precision="30"
ColumnName="CREATED_BY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Attribute
Name="CreationDate"
ColumnName="CREATION_DATE"
SQLType="TIMESTAMP"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="7"/>
</DesignTime>
</Attribute>
<Attribute
Name="ActionDate"
ColumnName="ACTION_DATE"
SQLType="DATE"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
TableName="FEEDBACK"/>
<Attribute
Name="ReviewedBy"
Precision="30"
ColumnName="REVIEWED_BY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Attribute
Name="AssignedTo"
Precision="30"
ColumnName="ASSIGNED_TO"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="FEEDBACK">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
</Attribute>
<Key
Name="Xpkfeedback"
PrimaryKey="true">
<DesignTime>
<Attr Name="_DBObjectName" Value="XPKFEEDBACK"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="ichip.util.Feedback.FeedbackId"/>
</AttrArray>
</Key>
</Entity>
View:
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
xmlns="http://xmlns.oracle.com/bc4j"
Name="FeedbackView"
Version="11.1.2.60.81"
SelectList="Feedback.FEEDBACK_ID,
Feedback.PAGE_NAME,
Feedback.SEVERITY,
Feedback.INTERNAL_ACTION,
Feedback.FEEDBACK_NOTE,
Feedback.INTERNAL_NOTE,
Feedback.REVIEWED_BY,
Feedback.CREATED_BY,
Feedback.CREATION_DATE,
Feedback.ACTION_DATE,
Feedback.ASSIGNED_TO"
FromList="FEEDBACK Feedback"
BindingStyle="OracleName"
CustomQuery="false"
PageIterMode="Full"
UseGlueCode="false"
OrderBy="Feedback.PAGE_NAME asc,Feedback.FEEDBACK_ID desc">
<EntityUsage
Name="Feedback"
Entity="ichip.util.Feedback"/>
<ViewAttribute
Name="FeedbackId"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="FeedbackId"
EntityUsage="Feedback"
AliasName="FEEDBACK_ID"/>
<ViewAttribute
Name="PageName"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="PageName"
EntityUsage="Feedback"
AliasName="PAGE_NAME"
DefaultValue="Feedback"/>
<ViewAttribute
Name="Severity"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="Severity"
EntityUsage="Feedback"
AliasName="SEVERITY"/>
<ViewAttribute
Name="InternalAction"
PrecisionRule="true"
EntityAttrName="InternalAction"
EntityUsage="Feedback"
AliasName="INTERNAL_ACTION"/>
<ViewAttribute
Name="FeedbackNote"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="FeedbackNote"
EntityUsage="Feedback"
AliasName="FEEDBACK_NOTE"/>
<ViewAttribute
Name="InternalNote"
PrecisionRule="true"
EntityAttrName="InternalNote"
EntityUsage="Feedback"
AliasName="INTERNAL_NOTE"/>
<ViewAttribute
Name="ReviewedBy"
PrecisionRule="true"
EntityAttrName="ReviewedBy"
EntityUsage="Feedback"
AliasName="REVIEWED_BY"/>
<ViewAttribute
Name="CreatedBy"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="CreatedBy"
EntityUsage="Feedback"
AliasName="CREATED_BY"/>
<ViewAttribute
Name="CreationDate"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="CreationDate"
EntityUsage="Feedback"
AliasName="CREATION_DATE"/>
<ViewAttribute
Name="ActionDate"
PrecisionRule="true"
EntityAttrName="ActionDate"
EntityUsage="Feedback"
AliasName="ACTION_DATE"/>
<ViewAttribute
Name="AssignedTo"
PrecisionRule="true"
EntityAttrName="AssignedTo"
EntityUsage="Feedback"
AliasName="ASSIGNED_TO"/>
</ViewObject> -
T1::
C1
C2
C3
T1
C1 C2 C3
A 100 1
A 108 2
B 104 1
B 106 2
Insert New record
Insert Into T1(C1,C2,C3)
Values(A,105,NULL);
Insert Into T2(C1,C2,C3)
Values(A,105,NULL);
Declare
Begin
For i in (select T1.C1 from T1,T2 Where T1.C1=T2.C1)
Loop
Update T1
Set C3=(Seelct Rn From
select ROW_NUMBER() OVER(Partition By C1 oder by C2 ) Rn from T1 where 1=i.C1
Where C1=i.C1
And C2=i.C2;
End loop;
End;
Is this update correct to make above sample data to
T1
C1 C2 C3
A 105 1 ---------------------> Inserted New Updated with 1
A 100 2 ---------------------> Old with C3=1 Now C3=2
A 108 3
B 104 1
B 106 2Or for the update part, you could do this:
update t1 set c3=(case when c3 is not null then c3+1
when c3 is null then 1 end)
where c1 =:c1;You are 'oder by C2' while C2 is not really in the order (105, 100, 108).
Here is the detail:
create table t1 (c1 varchar2(1), c2 number(3), c3 number(3));
insert into t1 values ('A',100, 1);
insert into t1 values ('A',105, NULL);
insert into t1 values ('A',108, 2);
insert into t1 values ('B',104, 1);
insert into t1 values ('B',106, 2);
insert into t1 values ('B',110, null);
CREATE OR REPLACE PROCEDURE TEST AS
CURSOR c1
IS
SELECT DISTINCT C1 FROM T1;
BEGIN
FOR item IN c1
LOOP
UPDATE t1
SET c3=(
CASE
WHEN c3 IS NOT NULL
THEN c3+1
WHEN c3 IS NULL
THEN 1
end)
WHERE c1 =item.C1;
END LOOP;
END TEST;
select * from T1 ORDER BY C1, C3;
A 105 1
A 100 2
A 108 3
B 110 1
B 104 2
B 106 3Edited by: PhoenixBai on Aug 30, 2010 12:47 PM -
Refresh af: table to fetch updated/additional records from db
Hi,
I have a jspx page having Create New Employee form and a table showing all the Employee records. I am using ADF Faces+Session Beans(EJB3.0)+JPA.
The create record form is not created from data control, but using adf input text boxes and binding them manually to backing bean properties, and on save button action, calling a session facade remote method, which inturn calls the persistEntity() of JPA. This is working fine.
The table is bound to data control , showing FindAll query results. This is also working fine.
The problem is,for example if i have 5 employee records in db, the table will show 5 records and then I create an employee record and click on save button, then i fire a sql query on db to 'select *' , it shows that record in db, but the table(on the same page) still shows 5 records. Table doesn't show the new record that I just created, even if I refresh the page.
So, in this case PPR and refreshing the iterator which shows the table, don't work. I even tried to invoke the method which fires FindAll query, again on save button click.But, that too, din't work. What is the solution?
Note: I am using JDev11g.Hi,
Can you brief me how you are adding the records. Like ... on click of add button opening a inline pop up and is it through that???
Try to do the following from your backing bean.
Solution#
======
Use returnlistener of the button/action link, which you are using to open the popup.
Here is the action how the add/edit inline popup is getting opened.
<af:commandImageLink action="editHistory"
immediate="true" id="clEdit"
visible="#{row.editable and (pageFlowScope.borrowerHistoryMB.userId eq row.sourceId)}"
shortDesc="Click to edit this comment."
icon="/images/edit.png"
useWindow="true" windowHeight="300"
windowWidth="500"
*returnListener="#{pageFlowScope.borrowerHistoryMB.refreshTableData}"* >
Code that needs to be added inside a managed bean.
=================================
public void refreshTableData(ReturnEvent returnEvent) {
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTarget(getHistoryTable());
Let me know if you have issue with any of these.
Thanks & Regards,
Kiran Konjeti
Maybe you are looking for
-
Import IMAGE type from SQL Server to BLOB in Oracle
Hello, Is there a way to import a IMAGE type from SQL Server to BLOB type in Oracle from one table to another through a database link? I'm waiting for an answer as soon as possible. Best regards, Florin Edited by: Florin Manole on Sep 10, 2008 11:53
-
trying to view my brother's transam blog that he created on mac.com in safari 1.3.2 on osx 10.3.9 and it shows no photos. pretty poor for a mac product. works fine on firefox - photos, slideshows, the works. gets more like microsoft with every new OS
-
OSX login page resolution issue switching back from a mirrored TV
I have an issue on my MacBook Pro with Retina display, OS X Yosemite (10.10.2). I use to connect an external tv via Mini DisplayPort - HDMI cable. Everything is ok untill I switch back to the single Retina Display: the OSX login page inherit the TV r
-
Hi Experts, I have a smartform which prints invoices - one at a time. Works perfectly. One header line and multiple detail lines. I want to print a range of invoices at one go. There will be multiple header lines and multiple detail lines. Please adv
-
Help, Im losing sound!
I have owned my iPod 20Gb for about a year and half, and when i went on holiday, something strange happened. For no apparent reason, the sound cut in volume and quality, and the vocals were almost completely muted. I managed to get the iPod restored