Insert rows without care about constrains..

Is this possible to insert rows without care about constrains??
This is important for me, because I try to add data to my tables and during the import console give me an error:
ORA-02291: integrity constraint (ADMIN.FK_LNE_FLOR) violated - parent key not found

As stated earlier in the thread the constraints exist for a reason. That reason is to protect the integrity of the data.
When you disable the constraints you disable them for all DML activity that takes place until you re-enable them. When you go to re-enable the constraints you will get an error if all violations are not fixed by the end of your processing prior to the enable.
You can tell Oracle to not validate the constraints and put them back anyway however in this case that would mean you have bad data in your tables (rows with column values missing the FK parent value, etc...) Having bad data will result in returning bad results in some of your queries which in turn isn't going to help your application any.
Disabling constraints can be useful as part of maintenance activity and re-enabling them without validation can save a lot of time such as when several columns are added to a table and populated making the row size greatly increase. If this resulted in a lot of migrated rows you might exp/trunc/imp. This would require disableing the FK. Re-validating the FK would take time but you know that all the data is still there so re-validation is not really necessary. This feature is not intended for every day use.
HTH -- Mark D Powell --

Similar Messages

  • Is it possible to insert row with timestamp field without to TO_TIMESTAMP

    hello
    is it possible to insert row with timestamp column without using to_timestamp unction
    somthing like insert into app.master values (3,333, 'inser tmstmp', 6.7, '2010-11-10 15:14', 'f','9','2010-12-22')

    784633 wrote:
    hello
    is it possible to insert row with timestamp column without using to_timestamp unction
    somthing like insert into app.master values (3,333, 'inser tmstmp', 6.7, '2010-11-10 15:14', 'f','9','2010-12-22')If you don't like the answers in your previous thread (Re: how can i set timestamp format don't expect to get different answers just because you start a new thread.

  • Adding 2 more rows to a select without inserting rows to base table

    hello all,
    i have a below simple select statement which is querying a table.
    select * from STUDY_SCHED_INTERVAL_TEMP
    where STUDY_KEY = 1063;
    but here is the situations. As you can see its returning 7 rows. But i need to add
    2 more rows..with everything else default value or what exist... except adding 2 more rows.
    i cannot insert into base table. I want my end results to increment by 2 days in
    measurement_date_Taken to 01-apr-09....so basically measurement_date_taken should
    end at study_end_Date...
    IS THAT EVEN POSSIBLE WITHOUT INSERTING ROWS INTO THE TABLE AND JUST PLAYIHY AROUND WITH
    THE SELECT STATEMENT??
    sorry if this is confusing...i am on 10.2.0.3
    Edited by: S2K on Aug 13, 2009 2:19 PM

    Well, I'm not sure if this query looks as good as my lawn, but seems to work anyway ;)
    I've used the 'simplified version', but the principle should work for your table to, S2K.
    As Frank already pointed out (and I stumbled upon it while clunging): you just select your already existing rows and union them with the 'missing records', you calculate the number of days you're 'missing' based on the study_end_date:
    MHO%xe> alter session set nls_date_language='AMERICAN';
    Sessie is gewijzigd.
    Verstreken: 00:00:00.01
    MHO%xe> with t as ( -- generating your data here, simplified by me due to cat and lawn
      2  select 1063 study_key
      3  ,      to_date('01-MAR-09', 'dd-mon-rr') phase_start_date
      4  ,      to_date('02-MAR-09', 'dd-mon-rr') measurement_date_taken
      5  ,      to_date('01-APR-09', 'dd-mon-rr') study_end_date
      6  from dual union all
      7  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('04-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
      8  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('09-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
      9  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('14-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
    10  select 1063, to_date('03-MAR-09', 'dd-mon-rr') , to_date('19-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
    11  select 1063, to_date('22-MAR-09', 'dd-mon-rr') , to_date('23-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual union all
    12  select 1063, to_date('22-MAR-09', 'dd-mon-rr') , to_date('30-MAR-09', 'dd-mon-rr') , to_date('01-APR-09', 'dd-mon-rr') from dual
    13  ) -- actual query:
    14  select study_key
    15  ,      phase_start_date
    16  ,      measurement_date_taken
    17  ,      study_end_date
    18  from   t
    19  union all
    20  select study_key
    21  ,      phase_start_date
    22  ,      measurement_date_taken + level -- or rownum
    23  ,      study_end_date
    24  from ( select study_key
    25         ,      phase_start_date
    26         ,      measurement_date_taken
    27         ,      study_end_date
    28         ,      add_up
    29         from (
    30                select study_key
    31                ,      phase_start_date
    32                ,      measurement_date_taken
    33                ,      study_end_date
    34                ,      study_end_date - max(measurement_date_taken) over (partition by study_key
    35                                                                          order by measurement_date_taken ) add_up
    36                ,      lead(measurement_date_taken) over (partition by study_key
    37                                                          order by measurement_date_taken ) last_rec
    38                from   t
    39              )
    40         where last_rec is null
    41       )
    42  where rownum <= add_up
    43  connect by level <= add_up;
    STUDY_KEY PHASE_START_DATE    MEASUREMENT_DATE_TA STUDY_END_DATE
          1063 01-03-2009 00:00:00 02-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 04-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 09-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 14-03-2009 00:00:00 01-04-2009 00:00:00
          1063 03-03-2009 00:00:00 19-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 23-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 30-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 31-03-2009 00:00:00 01-04-2009 00:00:00
          1063 22-03-2009 00:00:00 01-04-2009 00:00:00 01-04-2009 00:00:00
    9 rijen zijn geselecteerd.If there's a simpler way (in SQL), I hope others will join and share their example/ideas/thoughts.
    I have a feeling that this is using more resources than needed.
    But I've got to cut the daisies first now, they interfere my 'lawn-green-ess' ;)

  • The external GPS is used only for 911 but the device will not op without it...this causes great inconvenience for me, having to run that cable to a window in the trwo houses I use it..ids there a way to disable the GPS if I do not care about the 911 funct

    the external GPS is used only for 911 but the device will not operate without it...this causes great inconvenience for me, having to run that cable to a window in the two houses I use it..is there a way to disable the GPS if I do not care about the 911 functionability..?  this is the only downside I have with the network extender and it renders my device useless..

    Nope, GPS is a Federal requirement for anything operating a cellular telephone signal.  You don't ever plan to call 911 until you are in an emergency.  I don't see that requirement changing any time soon.
    If you are truly inconvenienced by the VZW network extender then perhaps you should disable you calling features in these areas and swap over to WiFi only.  There are many services and apps out there that can route your phone services through internet service providers. 

  • I have a few failed downloads on my iPod that I have bought and paid for. I don't care about the money but I would like to know how to delete them? Is there a way I can do it on my iPod without using a computer?

    I have a few failed downloads in the 'downloads' section on iTunes. It won't let me download any other video and it keeps asking me to 'tap to retry' I don't really care about the money lost but can anyone tell me if I can delete them from my iPod? Thanks x

    Have you tried resetting your iPod:
    Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.

  • Inserting row in DB4 From SAP / ABAP

    Hi experts.
    I'm facing a problem during the insertion of new rows on DB4 from data commng from SAP.
    I have already configured TXN DBCO using next parameters:
    AS4_HOST=XXXXXX;AS4_DB_LIBRARY=FILEAMP;AS4_QAQQINILIB=FTS000;
    Using program ADBC_TEST_CONNECTION for testing is working fine.
    I have created a test program for query and then insert a new row on table FTS000 but que query also workfine, it show the data that exists in the table. But when I´m trying to insert a new row it´s not working.
    The error message es:  An SQL error has occurred: FTS000 in FILEAMP not valid for operation. MSGID=CPF9898 Job=072969/DE1ADM/XDNDEV0000
    I´m using next ABAP CODE
    try.
       S10039BD.
    :wa_fts000-PERNR
      EXEC SQL.
        INSERT INTO FTS000 (PERNR, USRREG, FECREG, HORREG, BUKRS, BEGDA, ENDDA, MASSN, MASSG)
                    VALUES ( '00000034',  'ABAP06',  '20120112', '121212', '3100', '20120130', '20120130',  'xx', 'yy' )
      ENDEXEC.
      catch cx_sy_native_sql_error into exc_ref.
      error_text = exc_ref->get_text( ).
      message error_text type 'I'.
    endtry.
    On DB4
    5761SS1 V6R1M0 080215     Imprimir información SQL       Paquete SQL QTEMP/AS4EXTRA0G                01/24/12 16:12:53  Page   001
    Nombre de objeto..........QTEMP/AS4EXTRA0G                                                                               
    Tipo de objeto............*SQLPKG                                                                               
    CRTSQL***                                                                               
    PGM(QTEMP/AS4EXTRA0G)                                                                               
    SRCFILE(          /          )                                                                               
    SRCMBR(          )                                                                               
    COMMIT(*CHG)                                                                               
    OPTION(*SYS *NOEXTIND *PERIOD)                                                                               
    TGTRLS(*PRV)                                                                               
    ALWCPYDTA(*OPTIMIZE)                                                                               
    CLOSQLCSR(*ENDPGM)                                                                               
    DECRESULT(31 31 0)                                                                               
    STATEMENT TEXT CCSID(819)                                                                               
    STATEMENT NAME:  JFKEHDABLJAEIAAB                                                                               
    INSERT INTO FTS000 ( PERNR , USRREG , FECREG , HORREG , BUKRS , BEGDA , ENDDA ,                                                   
        MASSN , MASSG ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ? )                                                                          
      SQL5065  Plan de acceso no encontrado                                           
    Can any one help me about the problem.
    Thanks in advanced for your help.

    I assume that file FILEAMP/FTS000 is not journaled. The default isolation level for an INSERT operation is "WITH UR", and if the file (table) is not journaled, the operation is failing.
    You can either start journaling for the file (command: STRJRNPF), or you can perform the INSERT operation without commitment control by adding "WITH NC" to the end of the statement.
    Kind regards,
    Christian Bartels.

  • Count the no.of rows without using count function

    Hi,
    How to count the no.of rows without using the count function?
    Thanks,

    they won't be 100% accurate. You're correct, Bluefrog, but the same goes for doing a count(*) (depending on the size of the table, ofcourse):
    the table being queried might be under DML (deletes/inserts), and the next count(*) might give different results.
    Both approaches will never be 100% accurate.
    But simply selecting num_rows will be much much faster than doing a count(*).
    Counting the number of rows always reminds me of this ongoing discussion, by the way:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:127412348064#14136093079164 ;)
    Usually knowing the number of records by approximatly is sufficient, imo. 1000000 or 1000007 records: I don't care, don't need to know that.
    I've never needed to know the exact number of records in a table in my code, or been given a requirement that forced me to.

  • I am trying to insert rows for alert_id 22 with diff abc_id and xyz_id

    I am trying to insert rows for alert_id 22 with diff abc_id and xyz_id
    these inserts will store in two tables that I have to join in the cursor.
    I have written cursor without passing cursor parameters. but here i need to pass acb_id and xyz_id along with alert_id.
    then if these are saticified with alert_id 22 then I want to stop the loop run, else i need to continue the loop. bcause the abc_id and xyz_id are diff for alert_id 22
    This is the issue I am facing!
    Please let me know if you have any idea. Let me know how to use cursor parameters here and in loop.
    Sample proc like this::
    Declare
    main_cursor
    another_cur
    alert_cur
    begin
    need to check first abc_id,xyz_id is already exist with alert_id 22
    if this set of records already exists then
    exit from the loop
    else
    continue with
    loop
    here coming the insert statements with different condition getting from first two cursors.(this part is ok for me)
    end loop
    end if
    Please write the logic if any idea on this.
    -LRK

    I want to stop if already alert_id is exist!

  • FEEDBACK BUTTON MISSING !! do you really not care about our oppinion?

    dear sirs,
    for the number 1 software ,it is still totally incromprehensive to me,how you have not installed an easy FEEDBACK button in your softwares,especially in adobe's photography directory, which seems to be in a continous coma ,since you started this great idea.
    i am not sure how you get any kind of feedback from anyone ,without giving us members a very easy to be found feedback button to your great idea here.
    instead we have to start a forum discussion amongst ourselves, instead with you directly !!!!!
    do you NOT care about our wishes and ideas? .....it seems like it.......
    this idea of yours would take off if you just open your eyes and ears to the needs of the market.
    give us a "Feedback button" somewhere easy to find, in Bridge "AND" here on the site, right on top of your site.
    and then do "NOT" forget to hire staff that actually deals with these feedbacks....
    WE WANT TO TALK TO YOU DIRECTLY !!!!!!! DONT BLOW US OFF ON YOUR SITE !!!
    by redirecting us around your website like a ping pong ball, in order to only find FORUMS...
    thats just ridiculous!
    sincerely,
    akos
    AKOS PHOTOGRAPHY
    203 EAST 7TH STREET
    APT 4
    NEW YORK, NY, 10009
    TEL/FAX 212 982 4445
    http://www.akosphotography.com

    wow, that about the worst response i would have ever expected from anyone.
    your APD adobe photographers directory for example is none existing in the public market right now, mainly because your ad agency in london who is handling this departement, is not working on it.
    it could be the most powerful database for us consumers who pay thousands of dollars for adobe products,
    and you know what, we photographers would be very happy to pay to be part of great database. only yours is not functioning, ........buty i guess nobody cares at adobe...

  • Inserting rows in table while logging errors...Urgent

    Hi all,
    i want to insert rows from temp table to main table.
    if temp table contains 100 rows.then all rows must be inserted
    in main table.if their is any exception while insertion,
    insertion must nt stop and erroring rows along with error no must be inserted in
    error log table.
    How to do this ?
    i used forall save exceptions to achieve this .
    but ws able to save only error no. but not errroing rows in error log table.
    is there any efficient way to achieve this?
    can forall be modified in way that it inserts erroring rows also?????

    Hi,
    1.) does dbms_errorlog works fine in this case?If all of your 807 tables having same columns then i think it will work (NOT TESTED).
    By the way are you also trying to insert rows for all tese 807 tables in a single PL/SQL block?
    Please post how you are trying to insert then we can think about it,
    Oracle ERROR_LOG table allows us to have any number of columns.
    From the Oracle Docs:
    The number of columns in this part of the error logging table can be zero, one, or more, up to the number of columns in the DML table. If a column exists in the error logging table that has the same name as a column in the DML table, the corresponding data from the offending row being inserted is written to this error logging table column. If a DML table column does not have a corresponding column in the error logging table, the column is not logged. If the error logging table contains a column with a name that does not match a DML table column, the column is ignored.
    Regards

  • How to add enter-in-insert mode without post-generation steps

    Hello,
    We'd like to enter one of our pages in insert mode.
    We found the trick how to do it, there is one step which is a post JHeadstart generation step (add code to Page Definition). I'd like to know if we can avoid this post-generation step
    Here the complete list of steps
    (1) Model project, set View Object, Tuning to 'No Rows'
    (2) ViewController Project
    2.1 JHeadstart settings for the page
    - Single-row insert allowed Yes
    - Single-row update allowed Yes
    - SHow New Rows at Top Yes
    2.2 Generate the JHeadstart application
    2.3. Go to the Page which you'd like to enter in insert mode and click on 'Go to Page Definition'
    Add in the <executable> part the following code
    <invokeAction Binds="CreateAanmakenAdminEenheden" id="invokeCreate" Refresh="renderModel"
    RefreshCondition="${!adfFacesContext.postback and empty
    bindings.exceptionsList}"/>
    (see also http://download-uk.oracle.com/docs/html/B25947_01/web_form006.htm for more information)
    Make sure that the Binds part has the sam name as the <action id='Create...' which is available in the bottom part of the page definition.
    My question is
    How can we avoid this last post-generation step, the addition of code to the Page Definition file.
    I know you can unclick the 'Generate Page Definition' property in JHeadstart, but that introduces a risk that functionality is not included after changing the page.
    Regards Leon
    By the way, this is a lot of of work, just for entering a page in directly in insert mode. I think there can be made some improvement in ADF to accomodate this (a lot wanted) functionality.....

    Navid,
    You need to create custom templates to achieve this. The easiest way to get everything in place, is to first generate the group as insert-only (without search and query).
    This will generate the following:
    - in the page definition the ControllerClass property will be set to a JSF EL expression, something like #{EmpWizardPageLifecycle}
    - in the group beans config file, two beans are generated like this:
    <managed-bean>
    <managed-bean-name>EmpWizardPageLifecycle</managed-bean-name>
    <managed-bean-class>oracle.jheadstart.controller.jsf.lifecycle.JhsPageLifecycle</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>beforePrepareRenderMethods</property-name>
    <list-entries>
    <value-class>oracle.jheadstart.controller.jsf.bean.InvokeMethodBean</value-class>
    <value>#{CreateEmpWizardMethod}</value>
    </list-entries>
    </managed-property>
    <managed-property>
    <property-name>validateADFModel</property-name>
    <value>false</value>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>CreateEmpWizardMethod</managed-bean-name>
    <managed-bean-class>oracle.jheadstart.controller.jsf.bean.InvokeMethodBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>methodBinding</property-name>
    <!-- we leave out the JSF EL brackets, to prevent premature evaluation of the expression -->
    <value>bindings.CreateEmpWizard.execute</value>
    </managed-property>
    <managed-property>
    <property-name>executeCondition</property-name>
    <!-- we leave out the JSF EL brackets, to prevent premature evaluation of the expression -->
    <value>jsfNavigationOutcome=='StartEmpWizard' or param.StartEmpWizard=='true'</value>
    </managed-property>
    </managed-bean>
    The executeCondition does the trick here: it causes the page to start in insert mode when the navigation outcome is 'StartEmpWizar' or there is a request param named StartEmpWizard with value true.
    So, to get this functionality in a normal queryable group, you need to create a custom template for the groupFacesConfig.vm and add the two bean defs as above. And to get the ControllerClass property generated correctly, you can use the advanced group-level property Page Lifecycle class and set this to #{EmpWizardPageLifecycle}.
    (and replace EmpWizard with your own group name)
    Steven Davelaar,
    JHeadstart Team.

  • Just lost EUR 4,99 because of the Known Apple TV Bug. I don't care about the money! I just want to see this movie to the end! NOW!!

    just lost EUR 4,99 because of the Known Apple TV Bug. I don't care about the money! I just want to see this movie to the end! NOW!!

    Welcome to the Apple Community.
    Without knowing what the problem is, no-one can help. You did not need to repurchase anything.

  • Verizon does not care about customers!!!

    On Sunday, December 9th, I visited my local Verizon store in
    Inverness, Florida.
    I was excited about getting a new phone and had already
    decided on the new Galaxy S III. The store was pretty busy, so we I to wait,
    after waiting for about twenty minutes a very friendly sales representative by
    the name of Jay was ready to assisted me. I explained to him that earlier this
    year I had purchased and returned a phone but that my account had not been
    reset to show that I was eligible for upgrade. He then called into Verizon and
    spoke to someone named Brandy (<Phone Number deleted>) who stated that she
    could not do anything about this situation due to my lack of having a package
    tracking number from the phone I had “so-called returned” because it was not
    shown as being in the warehouse inventory. After numerous attempts by the sales
    representative, as well as myself, to further explain to her that I had
    documentation printed from Verizon showing my account being credited monies
    back after the phone had been received back into inventory. In an attempt
    extinguish the animosity between myself and this Verizon representative, Jay
    asked her if there was anyone else, possibly her superior, which we may speak
    to. She then put us on hold while she contacted said superior, which reiterated
    exactly what she had previously said. My store sale representative had kindly
    put his phone on speaker so that I might also be privy to the information given
    by these two female representatives. Along with my frustration of the
    situation, I had to also sit by as the two of them exchange casual niceties, as
    if the store sales representative or myself were not even present. By this
    point, I was extremely offended by the utter disregard for myself, being a
    loyal customer and for the embarrassed store representative. The superior
    explained that even though I had documentation showing the previously purchased
    phone had been returned, Verizon did not have any documentation from their
    warehouse as ever being received or restocked. She stated that she would have
    to file a form to investigate if the phone was indeed received. I was concerned
    because this issue was from the beginning of the year and it was now December,
    what if they could not find anything? I asked her that very question and she
    responded with the answers I dreaded the most: You will have to wait and see
    “if” we can find the phone, you are still under a contract because of your
    upgrade, and you will be eligible for upgrade again October 2013.
    I can not even begin to emphasize my disappointment in
    Verizon. I was completely shocked by how not only I was treated but how these
    female representatives had also disregarded a fellow Verizon employee too. At
    several points he actually had to ask if he could speak without being talked
    over by one of them. I would not refer any of my friends, family, or even total
    stranger to your company.
    The phone call ended with Brandy stating she would get back
    in touch with me with an update (which never happened). It is now December 20th
    and I am yet to hear from any Verizon representative. Earlier this evening, I
    called and spoke with Jennifer (Badge ID#<Deleted>) who was extremely helpful. I
    explained the prior situation and provided her with the exact information that
    I had provided previously to the store sales representative which then verbally
    relayed the information over the phone to the two female representatives. In
    matter of minutes, she was able to find a tracking# (<Tracking Number deleted>)
    that was received by the warehouse on March 2nd. She could also see
    that there was not a name documented for the Verizon employee that sold me the
    phone, which came up during my prior conversation because I had to keep
    defending myself that I had purchased the phone not in a store, not online, but
    over the phone when someone from Verizon contacted me. Jennifer placed me on
    hold while she contacted someone else to help her. It wasn’t long and she came
    back to the line reporting that she had been able to reset my eligibility. She
    apologized for it taking her so long, but I explained to her that when I had
    went into the store, I had to wait almost two hours without getting any
    acceptable results. I am glad to know that your store representative (Jay) and
    your customer service representative (Jennifer), still care about providing
    good customer service. If it was not for them, I would honestly believe that
    Verizon did not have one ethical employee who believes in doing the right
    thing!  Even though I finally got it reset, I have never received any response from customer service regarding their employees nasty attitude and lack of professionalism! After the way I was accused of not returning a phone that they had records of receiving, I think they should give me my upgrade for free!
    <Personal information of employees and tracking number removed for privacy per the Verizon Wireless Terms of Service .>
    Message was edited by: Verizon Moderator

    <Inappropriate comments deleted per the Verizon Wireless Terms of Service.>
    Message was edited by: Verizon Moderator

  • ORA-01840 error on inserting row trough object browser

    Dear Oracle Community,
    I'm getting the ORA-01840: Input value not long enough for date format error when I try to insert a row with the date value 24-MAY-10 with my object browser.
    This is the problem column:
    Column Name | Data Type| Nullable| Default | Primary Key
    SIGNUPDATE |DATE |No | - | -
    Now this will look like I'm using the wrong date format so I have googled and found that I should use the following query to check for the correct date format my database uses.
    select * from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
    This returns the DD-MON-RR format so I think I'm inserting the correct date format here.
    What am I doing wrong?
    I have already tried inserting with the following formats and tried replacing the - sign with the / sign.
    DD-MON-RR
    DD-MON-YY
    DD-MON-YYYY
    I have also tried using the SYSDATE is in the DD-MON-RR format trough the SQL commandline.
    I'm feeling like an idiot this should be simple right?
    Please help me out here this is frustrating, many thanks in advance.
    J Nijman

    using the SYSDATE is in the DD-MON-RR format trough the SQL commandlineIn sqlplus try:
    insert into <tablename> ( <date columnname> [, ... ] ) values ( sysdate [, ...] );
    To get a sysdate date value added. Or specify the format string with a to_date expression:
    insert into <tablename> ( <date columnname> [, ... ] ) values ( to_date( '24-may-10', 'dd-mon-yy') [, ... ] );
    The engine isn't picky about separators agreeing with the format string, most any character in place of the '-' dash is acceptable.
    Now to get an ora-1840 out of the object browser (Table/Data/Insert Row), I'm not having any luck trying to duplicate that. With the default nls_date_format 'DD-MON-YY' even trying bad dates (i.e. 30-feb-10 or 30-feb-2010, or even 31-apr-10) it either does an ora-1839: date not valid for month specified, or with a four digit year it gives an ora-1830: date format picture ends before converting entire input string.
    Any RDBMS presents programmers with date and datetime challenges, its not just an oracle-frustration thing ;)

  • API to insert rows in to PO_REQ_DISTRIBUTIONS_ALL

    Hi,
    Do we have any API to insert rows in to PO_REQ_DISTRIBUTIONS_ALL ?
    In iProcurement screen, we should be able to create multiple distributions and insert in to the table PO_REQ_DISTRIBUTIONS_ALL. Do we have any API to create the rows in this table.
    Thanks,
    HC

    But you have users who manually create requisitions without distributions? Those requisitions must be in incomplete status.
    I am not sure if the interface can create for existing requisitions.
    If it does not, ere is one approach
    Write a customization that creates records in the PO_REQUISITIONS_INTERFACE_ALL by looking at the incomplete reqs.
    The custom code then creates records in PO_REQ_DIST_INTERFACE_ALL for the distributions.
    Then the code cancels/deletes the original requisitions.
    Then you run requisition import to create new requisitions with appropriate distributions.
    If you keep requisition numbering manual, the new req. number can be the same as the old one that was deleted.
    Sandeep Gandhi

Maybe you are looking for