Setting the Previous row with New row value

Dear All,
I have a af:showDetailItem in which i have a af:table where i can add the Warranty details of Products in which i have:
eg:
Product | WEF | ValidUntil
================================================
Prod1 | 01-05-11 | 01-06-11
Prod2 | 02-06-11 |
Here i want to enter the "Valid Until" only when i create an entry for new Warrenty details and enter the WEF.ie Valid Until will be WEF-1 of the next row.
so any idea of how to solve this problem.?
Regards,
Soya.

Hi,
Aren't effective-dated entities used to create a new column based on some existing column in the same row.
But my need is to set the value of the previous row when the new row is inserted.
Product | WEF | ValidUntil
================================================
Prod1 | 01-05-11 | *01-06-11*
Prod2 | *02-06-11* |
rgds
Soya

Similar Messages

  • How to apply the constraint ONLY to new rows

    Hi, Gurus:
       I have one question as follows:
       We need to migrate a legacy system to a new production server. I am required to add two columns to every table in order to record who updates the row most recently through triggers, and  I should apply not null constraint to the columns . However, since legacy system already has data for every table, and old data does not have value for the 2 new columns. If we apply the constraint, all of existing rows will raise exception. I wonder if there is possibility to apply the constraint ONLY to new rows to come in future.
    Thanks.
    Sam

       We need to migrate a legacy system to a new production server. I am required to add two columns to every table in order to record who updates the row most recently through triggers, and  I should apply not null constraint to the columns .
    The best suggestion I can give you is that you make sure management documents the name of the person that came up with that hair-brained requirement so they can be sufficiently punished in the future for the tremendous waste of human and database resources they caused for which they got virtually NOTHING in return.
    I have seen many systems over the past 25+years that have added columns such as those: CREATED_DATE, CREATED_BY, MODIFIED_DATE, MODIFIED_BY.
    I have yet to see even ONE system where that information is actually useful for any real purpose. Many systems have application/schema users and those users can modify the data. Also, any DBA can modify the data and many of them can connect as the schema owner to do that.
    Many tables also get updated by other applications or bulk load processes and those processes use generic connections that can NOT be tied back to any particular system.
    The net result is that those columns will be populated by user names that are utterly useless for any auditing purposes.
    If a user is allowed to modify a table they are allowed to modify a table. If you want to track that you should implement a proper security strategy using Oracle's AUDIT functionality.
    Cluttering up ALL, or even many, of your tables with such columns is a TERRIBLE idea. Worse is adding triggers that server no other purpose but capture useless infomation but, because they are PL/SQL cause performance impacts just aggravates the total impact.
    It is certainly appropriate to be concerned about the security and auditability of your important data. But adding columns and triggers such as those proposed is NOT the proper solution to achieve that security.
    Before your organization makes such an idiotic decision you should propose that the same steps be taken before adding that functionality that you should take before the addition of ANY MAJOR structural or application changes:
    1. document the actual requirement
    2. document and justify the business reasons for that requirement
    3. perform testing that shows the impact of that requirement on the production system
    4. determine the resource cost (people, storage, etc) of implementing that requirement
    5. demonstrate how that information will actually be used EFFECTIVELY for some business purpose
    As regards items #1 and #2 above the requirement should be stated in terms of the PROBLEM to be solved, not some preconceived notion of the solution that should be used.
    Your org should also talk to other orgs or other depts in your same org that have used your proposed solution and find out how useful it has been for them. If you do this research you will likely find that it hasn't met their needs at all.
    And in your own org there are likely some applications with tables that already have such columns. Has anyone there EVER used those columns and found them invaluable for identifying and resolving any actual problem?
    If you can't use them and their data for some important process why add them to begin with?
    IMHO it is a total waste of time and resources to add such columns to ALL of your tables. Any such approach to auditing or security should, at most, be limited to those tables with key data that needs to be protected and only then when you cannot implement the proper 'best practices' auditing.
    A migration is difficult enough without adding useless additional requirements like those. You have FAR more important things you can do with the resources you have available:
    1. Capture ALL DDL for the existing system into a version control system
    2. Train your developers on using the version control system
    3. Determining the proper configuration of the new server and system. It is almost a CERTAINTY that settings will get changed and performance will suffer even though you don't think you have changed anything at all.
    4. Validating that the data has been migrated successfully. That can involve extensive querying and comparison to make sure data has not been altered during the migration. The process of validating a SINGLE TABLE is more difficult if the table structures are not the same. And they won't be if you add two columns to every table; every single query you do will have to specify the columns by name in order to EXCLUDE your two new columns.
    5. Validating the performance of the app on the new system. There WILL BE problems where things don't work like they used to. You need to find those problems and fix them
    6. Capturing the proper statistics after the data has been migrated and all of the indexes have been rebuilt.
    7. Capturing the new execution plans to use a a baseline for when things go wrong in the future.
    If it is worth doing it is worth doing right.

  • Updating row with a blob value

    Hi, I get the following error when trying to update a row with a Blob value. I am using a Bfile as the external file ref. to put into the Blob.
    ORA-22920: row containing the LOB value is not locked
    The code that I'm using is the following:
    PROCEDURE IOSYS_PCT.insert_blob AS
    length NUMBER;
    image BLOB;
    image_file BFILE;
    bf_dir VARCHAR2(40);
    bf_name VARCHAR2(40);
    BEGIN
    SELECT temp_blob INTO image FROM temp_blob; /*initialise image with empty_blob()*/
    SELECT image_sm, image_sm_file INTO image, image_file FROM images WHERE
    file_id=1;
    dbms_lob.filegetname(image_file,bf_dir,bf_name);
    DBMS_LOB.FILEOPEN(image_file,DBMS_LOB.FILE_READONLY);
    LOCK TABLE images IN ROW EXCLUSIVE MODE;
    length := DBMS_LOB.GETLENGTH(image_file);
    DBMS_LOB.LOADFROMFILE(image,image_file,DBMS_LOB.GETLENGTH(image_file));
    DBMS_LOB.FILECLOSE(image_file);
    UPDATE images SET image_sm = image WHERE file_id=1;
    END;
    Please help as I have ran out of ideas what could be wrong.
    Thanx Andre
    null

    Hi, I get the following error when trying to update a row with a Blob value. I am using a Bfile as the external file ref. to put into the Blob.
    ORA-22920: row containing the LOB value is not locked
    The code that I'm using is the following:
    PROCEDURE IOSYS_PCT.insert_blob AS
    length NUMBER;
    image BLOB;
    image_file BFILE;
    bf_dir VARCHAR2(40);
    bf_name VARCHAR2(40);
    BEGIN
    SELECT temp_blob INTO image FROM temp_blob; /*initialise image with empty_blob()*/
    SELECT image_sm, image_sm_file INTO image, image_file FROM images WHERE
    file_id=1;
    dbms_lob.filegetname(image_file,bf_dir,bf_name);
    DBMS_LOB.FILEOPEN(image_file,DBMS_LOB.FILE_READONLY);
    LOCK TABLE images IN ROW EXCLUSIVE MODE;
    length := DBMS_LOB.GETLENGTH(image_file);
    DBMS_LOB.LOADFROMFILE(image,image_file,DBMS_LOB.GETLENGTH(image_file));
    DBMS_LOB.FILECLOSE(image_file);
    UPDATE images SET image_sm = image WHERE file_id=1;
    END;
    Please help as I have ran out of ideas what could be wrong.
    Thanx Andre
    null

  • HT5622 I have just received a new iphone 5s and need to set the Apple ID with my work email.  I used my work email on my personal iphone 4s to set up an icloud account and it will not let me use my work email as the Apple ID on my new iphone. What do I do

    I have just received a new iphone 5s and need to set the Apple ID with my work email.  I used my work email on my personal iphone 4s to set up an icloud account and it will not let me use this email as the Apple ID on my new iphone.  As it is a work phone I need to use this email address as my Apple ID.  How do I do this?

    when you open the app store scroll down to the bottom it will display the apple id currently in use, change it to your normal apple id email

  • [svn] 3127: Updating asdoc to replace the avmplus call with new set of java files.

    Revision: 3127
    Author: [email protected]
    Date: 2008-09-05 14:16:53 -0700 (Fri, 05 Sep 2008)
    Log Message:
    Updating asdoc to replace the avmplus call with new set of java files.
    Removing all files related to asdochelper.
    QA: Yes, also please test on non windows platform.
    Doc:
    Tests: checkintests, asdoc
    Reviewed by: Pete Farland
    Modified Paths:
    flex/sdk/trunk/asdoc/templates/ASDoc_Config_Base.xml
    flex/sdk/trunk/asdoc/templates/asdoc-util.xslt
    flex/sdk/trunk/modules/compiler/build.xml
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocAPI.java
    Added Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsClass.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocHelper.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/QualifiedNameInfo.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/SortComparator.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va
    Removed Paths:
    flex/sdk/trunk/asdoc/templates/asDocHelper
    flex/sdk/trunk/asdoc/templates/asDocHelper.linux
    flex/sdk/trunk/modules/compiler/asdoc/

    I had a generic record class that has a HashMap to hold the data fields (...)
    method called createRecord() for each record type which would populate the HashMap with the correct data fieldsI'm not sure I understand: are the contents of this field map the same between two records of the same type? Then yes, you don't need to clone the map per record instance.
    one thing that needs fixing is the fact that each time the createRecord() method is called I'm creating a new fieldMap to define the dataFields in the record class.Probably, but that will only get you a little bigger files; you won't gain an order of magnitude on the size of files. The problem for huge files is that as soon as their content is bigger than the available memory, you'll run into problems. A more radical approach if you need to address huge files is to process the records on the fly, and not load all records in memory. Of course not all algorithms or business logic can afford that...
    I know I could rewrite the code and create a class for each record type and declare the fieldMap static but I was wondering if anyone had any better suggestions The Record instance could receive and keep a reference to its RecordType instance, and ask the RecordType instance the DataType for a field's name. That way the RecordType encapsulates the map, and there's less risk that a clumsy other class modifies the static map.
    before I go rewriting a load of code.A load of code?!? Even with the idea of the static map, you only have to edit the enum type (well more accurately, each RecordType enumerated constant's createRecord() method).

  • FM required for setting the message body with values from table

    Hi all,
      I have a retq wherein in tcode VL31n when i create the IBD,after saving the document,i need to send a mail to few people in the FI dept with the foll deatils:
    Inbound delivery no.
    A. Bill of Lading no.
    B. Bill of Lading date
    C. No. of containers
    D. Invoice no.
    E. Invoice date
    F. Supplier name
    G. Vessel name
    H. Name of the receiving port
    I. Final Destination,,
    J. Expected date of arrival
      The method used is SAVE_AND_PUBLISH_DOCUMENT.i get all these deatils in the table it_xlikp.But is there  any FM by means of which i cna read these  values and set the message body with these values and send this  as  a mail using the FM SO_DOCUMENT_SEND_API1?Full points will be  awarded..Any help is appreciated..
    Regards,
    Disha.

    HI Disha
    Check out these links. They will surely help
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    If you find this answer useful, please reward me for the same.
    Good luck
    Karthik Potharaju

  • Display a column as row with same row names.

    Hi,
    My belwo query displaying o/p in this format.I need to conver a row with appriate colmn value (see the required o/p).
    could some help.
    current o/p
    TEST_SESSION_ID       ROSTER_DOMAIN_NAME             TO_CHAR(A.SCORE)     SEM
    4087               AR - Integers and Fractions     5.148757270620481     1
    4087               AR - Decimal Numbers            5.5597596042656825     2required o/p format
    TEST_SESSION_ID          AR - Integers and Fractions  AR - Decimal Numbers    sem-AR -                    sem
                                                                              Integers and Fractions    AR - Decimal Numbers
    4087                  5.148757270620481             5.5597596042656825           1                   2ROSTER_DOMAIN_NAME are not staticks.I tcould be increase .some times it could have 20 names.Since i can t use decode or case with statically .can some one help on this.
    query
    SELECT a.test_session_id,c.roster_domain_name,to_char(a.score),a.sem FROM
          test_session_detail a,test_session b ,test_detail c
          WHERE a.test_session_id = b.test_session_id
          AND c.test_detail_id = a.test_detail_id
          AND exists (
          select td.test_detail_id
          from test_detail td
          where domain_map_id is not  null
          and c.test_detail_id =td.test_detail_id
          and domain_map_id in('303','306','305','304'))
          AND b.test_session_id in ('4087')
          AND domain_group_id NOT IN (
          SELECT domain_group_id
          FROM test_session_detail a,test_session b
          WHERE a.test_session_id = b.test_session_id
          AND a.domain_group_id is not null
          AND b.test_session_status_id = 4
          AND a.test_session_status_id <> 3
          AND b.test_session_id IN ('4087'))

    Ok, the problem here is that you want a dynamic pivot of data and you also want to use some of the data as the column names.
    SQL requires that the columns to be retrieved are known at query parse time, i.e. before any data is fetched, so it's not easily possible to have dynamic column names done in a single query.
    The general steps in executing a query are...
    1. Submit SQL query (Open Query)
    2. SQL Query Parsed
    3. SQL Query Executed
    4. Row Fetched
    5. Repeat step 4 until no more rows
    6. Close QuerySo, as you can see no data is fetched until step 4, but, at Step 2, the SQL engine needs to have parsed the query and already know what columns and data types are going to be returned.
    An example of how something similar can be achieved is given on this thread:
    How to pipeline a function with a dynamic number of columns?
    But that may be a little too complex to implement.
    What you are really wanting is something at the front end reporting side of things.
    Ideally, this is the task of a reporting tool, not of the SQL engine which is retrieving the data.

  • Hi Lèonie, it is still recording only 8 minutes (more or less). I take off the 'metronomo', time is 'on', the section timing is on 'automatic'. What do you mean saying 'set the tempo to a very low value'  ? Thank you again. Ipad Retina ...

    Hi Lèonie, I tried, but it still recording only 8 minutes (more or less).
    I took off the 'metronomo', tempo is on (automatic), the section time
    is on (automatic).
    What do you mean when you say "set the tempo to a very low value" ?
    Thank you again.
    Best Regards,
    Enrico

    Enrico,
    in your previous post you said:
    GarageBand (used with a Mic microphone) is stopping to record after only 7/8 minutes.
    In which way I may record a complete concert or at least one hour of music ???
    If you want to record at least one hour of music, you need to make the max. of 320 bars last for a long time - for example:
    With a maximum of 320 bars, a song with160 bpm and a 4/4 measure will only last for 8 minutes; to make it last 32 minutes, reduce the tempo to 40 bpm.
    Léonie

  • How I can stop the combo box with list of values from fireing validations

    Hi I'm using Jdeveloper 11.1.2.3.0
    Using Hr Schema employees table
    I Display employees data in af:table
    and I make List Of values on Department_id filed to easy change the employee department
    and another one on Job_id filed
    and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
    the problem is when I Select a value from department or jobs ( combo box with list of values )
    fires the entire filed validations for mandatory atributes
    Note : the af:table Property ( contedelivery) is set to (immediate )
    How I can stop the combo box with list of values from fireing validations

    check it out.,
    http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html

  • Setting the name of a new object from a string

    Is there anyway I can set the object name of a newly created
    object from a string?
    eg.
    (the code below generates a compile time error on the
    variable declaration)
    public function addText(newTxt:String, txt:String,
    format:TextFormat):void {
    var
    this[newTxt]:TextField = new TextField();
    this[newTxt].autoSize = TextFieldAutoSize.LEFT;
    this[newTxt].background = true;
    this[newTxt].border = true;
    this[newTxt].defaultTextFormat = format;
    this[newTxt].text = txt;
    addChild(this[newTxt]);
    called using>
    addText("mytxt", "test text", format);
    I could then reference the object later on without using
    array notation using mytxt.border = false; for example
    There are many a time when I want to set the name of a new
    object from a string.
    In this example I have a function that adds a new text object
    to a sprite.
    The problem is, if I call the function more than once then
    two textfield objects will exist, both with the same name. (either
    that or the old one will be overwritten).
    I need a way of setting the name of the textfield object from
    a string.
    using
    var this[newTxt]:TextField = new TextField()
    does not work, If I take the "var" keyword away it thinks it
    a property of the class not an object.
    resulting in >
    ReferenceError: Error #1056: Cannot create property newTxt on
    Box.
    There must be a way somehow to declare a variable that has
    the name that it will take represented in a string.
    Any help would be most welcome
    Thanks

    Using:
    var this[newTxt]:TextField = new TextField()
    is the right approach.
    You can either incrment an instance variable so that the name
    is unique:
    newTxt = "MyName" + _globalCounter;
    var this[newTxt]:TextField = new TextField();
    globalCounter ++;
    Or store the references in an array:
    _globalArray.push(new TextField());
    Tracy

  • I downloaded the new version of Mozilla and tried to install an add-on to allow me to set the home page for new tabs. The app says it has downloaded but does not open new tabs as my home page (google) - any suggestions what I can do?

    I downloaded the new version of Mozilla and tried to install an add-on to allow me to set the home page for new tabs. The app says it has downloaded but does not open new tabs as my home page (google) - any suggestions what I can do?

    I've been working on this all day!!! I've tried everything I know of and can't get it to load either. Sounds like lots of people are having problems. Here is what I have so far...I have uninstalled EVERYTHING on my pc from apple and reinstalled itunes to no avail. I have tried all sorts of things I've read as fixes online. NOTHING has worked. Here is something interesting that i have noticed though. my main pc (which is the one i have always managed my itunes account with for years) is a 32 bit system running windows 7. Yesterday I installed itunes for the first time on my new netbook which is a 64 bit (windows 7) system and it works just fine. i have three other laptops (all window 7) in my household that are all 64 bit operating systems and ALL have updated to 10.5 and THEY ALL work fine. this is FOUR 64 bit systems ALL updated w/10.5 that work and ONE that is a 32 bit that will not. Can't get any help from apple. their suppot *****! I want to get someone on the **** phone or a live chat but cant. *** APPLE????? please let mw know if you find SOMETHING i can try next. I'm out of ideas and patience!

  • Ask your question.updated to IOS 6.1.  I cannot configure my iMessage properly with this version.  Everytime it verifies the email addresses associated with my apple Id the page reverts back to the previous one with the sign in portion.  What should I do?

    Please assist with the iMessage configuration.  My iMessage used to work with the previous version.  With 6.1 I cannot configure iMessage properly.    After I sign in using my apple id.  It directs me to the next page with all the email add associated with the I. d. After confirming the email addresses it verifies then reverts back to the previous page with the sign in portion.  What should I do?

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
     Cheers, Tom

  • My dad died and I need to set the IPAD up as new.  How do I do that?

    My dad died last May and my mom gave me his iPad to use.  I need to set the iPad up as new but having problems.  I tried the online restore instructions using iTunes, but I can not read my dads apple password completely.  I have his apple ID but the password he wrote down is in pencil and fuzzy to read 2 letters correctly.  Does anyone know how to totally reset this?

    Brian, thank so much for this info.  I have been plugging along on the internet to find an answer to this puzzle before I had to go to the Apple store cuz I know it will cost some bucks to fix.  I am on a starving artists income, so god love the internet cuz I finally found the solution on this link.  I hope it can help others with the same problem like me.  Step #1- I had the latest version of itunes on my pc originally cuz I have an ipod, but I ended up having to uninstall and reinstall the latest version.  Than 2nd step I had to reset my host file too (do not ask me why, but follow this link's info for step 2)- thttp://support.microsoft.com/kb/972034
    Here is the rest of the instructions on this link to now follow for step #3.  http://www.macworld.co.uk/how-to/iosapps/how-hack-ipad-iphone-passcode-3504927/
    I appreciate everyone's support on this matter, my thanks!

  • How to change the Existing alias with new alias name...MAXL SCRIPT

    HI Experts
    I need to change alias name of the existing member with new alias name.
    please send me maxl code to change the alias name .
    My thought is
    1) Old alias should be replaced with new alias name .
    2)There is one account that should be rolled out to another parent..these parents are already exsist
    3) I need a MAXL Script to change the new alias name .
    please suggest ASAP.
    Thanks
    USER

    John
    I heard that we can replace existing alias name with new alias thru MAXL
    i.e replace alias name XXXX member with YYYY ;
    please correct me if iam wrong ,might be Maxl command is wrong but this is the idea.
    Thanks
    USER

  • Im having problems with my Kids facetime accounts that seem to be because they are both using my itunes and there are conflicts with multiple email addresses? Is it possible to now set the kids up with their own accounts without losing their apps etc

    Hi All,
    I have my kids using iTunes via thier ipods etc through my own account and this hase been the case for some time?
    This has started to cause issues lately with imessaging and facetime, as there seems to be a limit on email addresses that can be associated with one account?
    I wonder if I would be best off setting the kids up with their own accounts, but want to be able to do this without them losing their existing apps, music etc?
    Is this possible, if so is there a simple process cos I can seem to find anything relating to this?
    many thanks, Jim

    Not going to happen the way you want it to.
    When you add a gift card balance to the Apple ID, it's available for the Apple ID.
    Probably best to create unique Apple ID's for each... this will also make things easier in the future as purchases are eternally tied to the Apple ID they were purchased with.

Maybe you are looking for

  • How to set a default value to ADF CoreInputText ?

    Hello, I try to set a default value to a CoreInputText, JDev 10.1.3 automatically turns it into a CoreOutputText ! When jspx is rendered, I am not be able to edit my input default value anymore. Here are my tries: (a) Bind directly to a managed bean

  • My (potential) World of Pain --- what would you do?

    I have also posted this in the Creative Cow forums -- apologies if you read both forums and see this twice, but I wanted to make sure I hit both forums. I am starting to edit a project that will mix footage from Red Epic, Blackmagic Camera & Pana AF1

  • BW statistics - missing ODS

    Can anyone tell me why my ODS is not in the list for activation of statistics? I have created a couple of ODS' and transported. I'd like to use stats to analyse the data loads but only some of the ODS' are in the list to activate (Tools->BW Statistic

  • Final OK on print page, can't get to it.

    when I push the print button, on any document, it takes me to the next page where you have to click  OK, that button is at the bottom of the page and I can't get to it because the line with the open documents cover the OK button and I can't get to it

  • HT4623 My Wi-Fi is greyed out why?

    Why is my Wi-Fi greyed out on my iPhone4s?  I am unable to turn my wifi back on?  Why?