Statement SQL: UPDATE

Hi all,
can you insert into one Command a SELECT and in another Command an UPDATE?
Thanks a lot

Hi, I noticed this threat was still an open item; has there been a resolution as of yet? I have a similar situation...
I need to add a value to a column if that value does not exist. I am fairly new to sql and was trying to use the Update command with the select statement (ex:
SELECT "VW"."HE"
FROM "AM_FACADE"."NM_OUTBOUND_SCHEDULE_BID_V" "VW"
UPDATE "VW"
SET "VW"."HE" = IN['1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ,'11', '12','13','14','15','16','17','18','19','20','21','22','23','25','25']
WHERE "VW"."HE" = IN['1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ,'11', '12','13','14','15','16','17','18','19','20','21','22','23',"24"]
Basically I want it to check the HE column to see if the 25th hour exist, if not add it.
Any help would be appreciated.

Similar Messages

  • SQL UPDATE Statement Explaination (urgent please...)

    Hi,
    Could anyone explain for me what this statement will do:
    update KPIR KR
    set ( CA ) = (
    select sum(sl.RRC_CONN_STP_ATT) CA
    from PV_WCEL_SERVICE_LEVEL sl, UTP_MO um
    where sl.GLOBAL_ID = um.CO_GID
    group by sl.STARTTIME, um.OBJECT_INSTANCE
    I could not understand how the mapping between the two tables will be ("um" clause is not used in the select statement and it is used only in the "where" and "group by" arguments) What does this mean?.
    The actual problem is that when I execute the above SQL statement, it was take around just 3 minutes to be implemented. But after we upgrade from Oracle 8 to Oracle 9, this statement is taking around 3 hours to be implemented.
    Anyone have any idea what is the problem?

    Below is the plan:
    KPIR table:
    RNC_ID (str), PST ('YYYYMMDD_HH24'), CA (Numner)
    1, 20061105_13, 0
    1, 20061105_14, 0
    1, 20061105_15, 0
    2, 20061105_13, 0
    2, 20061105_14, 0
    2, 20061105_15, 0
    3, 20061105_13, 0
    3, 20061105_14, 0
    3, 20061105_15, 0
    4, 20061105_13, 0
    4, 20061105_14, 0
    4, 20061105_15, 0
    PV_WCEL_SERVICE_LEVEL table:
    GLOBAL_ID (str), STARTTIME ('YYYYMMDD_HH24'), RRC_CONN_STP_ATT (Number)
    A1, 20061101_00, 9
    A1, 20061101_01, 4
    A1, 20061101_23, 3
    A1, 20061130_23, 4
    A2, 20061101_00, 3
    A2, 20061101_01, 4
    A2, 20061101_23, 1
    A2, 20061130_23, 5
    UTP_MO table;
    RNC_ID (str), GLOBAL_ID (str), OBJECT_INSTANCE (str)
    1, A1, <A1_NAME>
    1, A2, <A2_NAME>
    1, A9, <A9_NAME>
    2, B1, <B1_NAME>
    2, B2, <B2_NAME>
    2, B9, <B9_NAME>
    3, C1, <C1_NAME>
    3, C2, <C2_NAME>
    3, C9, <C9_NAME>
    4, D1, <D1_NAME>
    4, D2, <D2_NAME>
    4, D9, <D9_NAME>
    Now, I want to update the value of CA in table KPIR:
    For instance, for RNC_ID='1' and at PST='20061105_13', the CA should equals to the sum of value RRC_CONN_STP_ATT for all GLOBAL_IDs under RNC_ID='1' and at STARTTIME '20061105_13'.
    So, is this SQL UPDATE statement will do it?
    update KPIR kr
    set ( CA ) = (
    select sum(sl.RRC_CONN_STP_ATT) CA
    from PV_WCEL_SERVICE_LEVEL sl, UTP_MO um
    where sl.GLOBAL_ID = um.GLOBAL_ID and kr.RNC_ID = um.RNC_ID and kr.PST = sl.STARTTIME
    group by sl.STARTTIME, um.OBJECT_INSTANCE
    And if so, why it is taking around 3 hours to be implemented? This issue is happened after upgrading from Oracle 8 to 9.
    Really appreciate your help and thanks in advance.

  • Sql Update Statement (complex)

    Hi ,
    A very good morning to all.
    I am stuck in a problem , and i really hope for solutiion.
    I have a dimension table (DIM_CAR) for which i need to write a update statement.
    My table structure is :
    C_ID           Startdate                       EndDate
    7546343    2012-05-29 00:00:00    NULL
    7546343    2012-05-18 00:00:00    2012-05-29 00:00:00
    7546343    2012-05-14 00:00:00    2012-05-18 00:00:00
    7546343    2012-05-10 00:00:00    2012-05-10 00:00:00
    7546343    2012-05-10 00:00:00    2012-05-14 00:00:00
    7546343    2012-03-22 00:00:00    2012-03-22 00:00:00
    7546343    2012-03-15 00:00:00    2012-03-22 00:00:00
    7546343    2012-02-02 00:00:00    2012-03-15 00:00:00
    7546343    2012-01-31 00:00:00    2012-02-02 00:00:00
    Now the scenario is Whenever any update comes in car , then it closes the previous record and open a new record(SCD)
    For e.g the 1st update comes on 2012-02-02 , so it closes the last record (by putting 2012-02-02) in end date and open a new record by putting 2012-02-02 in startdate. Then update comes in 2012-03-15 and so on. The last record is for 2012-05-29 which is
    still open as there is no update after that,
    so whenever any update come it opens a new record with startdate value is extract date and enddate value NULL and closes the previous. Then  after another update , that NULL value is replace by the new date and another record opens.
    My prob is if you will closely analyse the dates , then there are some records missing in the above table due to which there are discrepencies in dates.
    E.g. If u see the 6th row, startdate is 2012-03-22 and enddate is also 2012-03-22. But here in this case the enddate should be 2012-05-10(which is next update)
    I need to write a sql script to update enddates with the latest update startdate in my table. I have 60000 of C_id which are affected.
    COULD ANYONE plz Help.. I knw its difficult but u can give a try ..........Plz ask if anyone requires more info.
    Abhishek

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    >> I have a dimension table (DIM_CAR) for which I need to write a update statement. My table structure is : <<
    NO! This is a picture of the data; it is not DDL! Is this what you would have posted if you had manners? 
    CREATE TABLE Foobars
    (c_id CHAR(7) NOT NULL, 
     foo_start_date DATE NOT NULL, 
     PRIMARY KEY (c_id, foo_start_date), -- my guess!!
     CHECK (foo_start_date < foo_end_date),-- another guess! 
     foo_end_date DATE);
    INSERT INTO Foobar
    VALUES 
    ('7546343', '2012-05-29', 'NULL), 
    ('7546343', '2012-05-18', '2012-05-29'), 
    ('7546343', '2012-05-14', '2012-05-18'), 
    ('7546343', '2012-05-10', '2012-05-10'), 
    ('7546343', '2012-05-10', '2012-05-14'), 
    ('7546343', '2012-03-22', '2012-03-22'), 
    ('7546343', '2012-03-15', '2012-03-22'), 
    ('7546343', '2012-02-02', '2012-03-15'), 
    ('7546343', '2012-01-31', '2012-02-02');
    Now the scenario is Whenever any update comes in car, then it closes the previous record [sic: rows are not records! Please learn basic terms] and open a new record [sic](SCD). 
    What is “SCD” and why do you think it is meaningful to us? Here is an article on this topic. 
    Modifying Contiguous Time Periods
    This article explains how to modify contiguous time periods that were described in Joe Celko’s article 'Contiguous Time Periods in SQL'.  Joe describes the table itself that he calls the 'Kuznetsov History Table'. He explains how it is used to store contiguous
    time intervals with constraint to ensure that the date periods really are contiguous, The editor suggested that I give a brief description of how to modify the data in the History table as this may not be entirely obvious.
    When trusted constraints enforce data integrity, the data is guaranteed to be valid at the end of any statement, even if it is not committed. When we modify contiguous time periods, in order to get from one valid state to another we may need to insert a row
    and update another one, or we may need to delete a row and update another one. This is one of those cases when MERGE really shines – it allows us to get from one valid state to another in one statement, inserting, updating, and deleting rows as needed.
    CREATE TABLE Tasks
    (task_id INT NOT NULL, 
     task_score INTEGER NOT NULL, 
     current_start_date DATE NOT NULL, 
     current_end_date DATE NOT NULL, 
     previous_end_date DATE NULL, 
     CONSTRAINT PK_Tasks_task_id_current_end_date 
     PRIMARY KEY (task_id, current_end_date), 
     CONSTRAINT UNQ_Tasks_task_id_previous_end_date 
      UNIQUE (task_id, previous_end_date), 
     CONSTRAINT FK_Tasks_task_id_previous_end_date 
      FOREIGN KEY (task_id, previous_end_date) 
      REFERENCES Tasks (task_id, current_end_date), 
     CONSTRAINT CHK_Tasks_previous_end_date_NotAfter_current_start_date 
      CHECK (previous_end_date <= current_start_date), 
     CONSTRAINT CHK_Tasks_current_start_date_Before_current_end_date 
      CHECK (current_start_date < current_end_date)
    Some Easy Modifications.
    It is easy to begin a new series of time periods
    INSERT INTO Tasks
      (task_id, task_score, current_start_date, current_end_date, previous_end_date)
    VALUES (1, 100, '2010-1002', '2010-1023', NULL),
           (1, 80, '2010-1023', '2010-11-03', '2010-1023');  
     It is just as easy to continue adding periods to the end of the series.
    INSERT INTO Tasks
      (task_id, task_score, current_start_date, current_end_date, previous_end_date)
    VALUES(1, 98, '2010-11-20', '2010-11-25', '2010-11-03'),
          (1, 75, '2010-11-26', '2010-11-27', '2010-11-25');
    Deleting one or more rows from the end is just as easy, and we shall skip the example. As we have seen, it is easy to perform typical, the most common operations against history of periods.
    However, some other operations are less easy and need more explanations. Now that we have enough test data, let us move on to more complex examples. Here is the test data at this moment: 
    Adding periods to the beginning.
    Each series of periods has exactly one first period – this is enforced by the following constraint: Unique_task_id_and_previous_end_date
    As a result, when we are inserting one or more periods to the beginning of the series, we have to update the period that used to be the first, as follows:
    MERGE INTO Tasks 
    USING (VALUES (1, 98, '2009-03-01', '2009-03-06', NULL),
                  (1, 100, '2010-10-02', '2010-10-23', '2009-03-06') 
           ) AS Source (task_id, task_score, current_start_date, current_end_date, previous_end_date)
       ON Tasks.task_id = Source.task_id
           AND Tasks.current_start_date = Source.current_start_date
    WHEN MATCHED 
    THEN UPDATE
         SET task_score = Source.task_score, 
             current_start_date = Source.current_start_date, 
             current_end_date = Source.current_end_date, 
             previous_end_date = Source.previous_end_date
    WHEN NOT MATCHED 
    THEN INSERT (task_id, task_score, current_start_date, current_end_date, previous_end_date)
     VALUES (Source.task_id, Source.task_score, Source.current_start_date,
             Source.current_end_date, Source.previous_end_date); 
    Now we will verify that our test data looks as expected, with a new row at the beginning, and previous_end_date column is modified to point to the new row for the row that used to be the first before this modification:
    We are also going to discuss some other scenarios, such as adding/deleting periods in the middle of the series. In all these cases we shall be using MERGE, and the DML looks quite similar, so let us wrap it up in a stored procedure.
    CREATING A STORED PROCEDURE
    The following code implements this merging functionality with a stored procedure that uses a table to hold teh new rows:
    CREATE TABLE NewTasks
    (task_id INTEGER NOT NULL, 
    task_score INTEGER NOT NULL, 
    current_start_date DATE NOT NULL, 
    current_end_date DATE NOT NULL, 
    previous_end_date DATE NULL,
    deletion_flg CHAR(1));
    CREATE PROCEDURE MergeNewTasks
    AS BEGIN 
    MERGE INTO Tasks 
    USING (SELECT task_id, task_score, current_start_date, current_end_date, previous_end_date, deletion_flg
             FROM NewTasks) AS Source
       ON Tasks.task_id = Source.task_id
          AND Tasks.current_start_date = Source.current_start_date
    WHEN MATCHED AND deletion_flg = 'Y'
    THEN DELETE
    WHEN MATCHED 
    THEN UPDATE SET
         task_score = Source.task_score, 
         current_start_date = Source.current_start_date, 
         current_end_date = Source.current_end_date, 
         previous_end_date = Source.previous_end_date
    WHEN NOT MATCHED 
    THEN INSERT (task_id, task_score, current_start_date, current_end_date, previous_end_date) 
     VALUES (Source.task_id, Source.task_score, Source.current_start_date, Source.current_end_date, Source.previous_end_date);
    END; 
    Let us use this stored procedure.
    Filling a gap in the middle of the series
    The following code fills the gap on November 25th.
    CREATE TABLE NewTasks (..);
    INSERT INTO NewTasks
      (task_id, task_score, current_start_date, current_end_date, previous_end_date, deletion_flg)
    VALUES (1, 75, '2010-11-25', '2010-11-26', '2010-11-25', 'N'),
     (1, 80, '2010-11-26', '2010-11-27', '2010-11-26', 'N');
    EXEC MergeNewTasks NewTasks = NewTasks;  
    Here is the data after this modification, with a period added in the middle fo the series:
    Deleting a period in the middle of the series
    The following code deletes the period added in the previous example.
    CREATE TABLE NewTasks (..);
    INSERT INTO NewTasks
      (task_id, task_score, current_start_date, current_end_date, 
        previous_end_date, deletion_flg)
    VALUES (1, 75, '2010-11-25', '2010-11-26', '2010-11-25', 'Y'),
           (1, 80, '2010-11-26', '2010-11-27', '2010-11-25', 'N');
    EXEC MergeNewTasks;  
    Here is the data after this modification:
    Inserting two periods in the middle, and adjusting an exaisting period to make room for them. This is the last and most complex example involving our stored procedure:
    CREATE TABLE NewTasks (..);
    INSERT INTO NewTasks
      (task_id, task_score, current_start_date, current_end_date, previous_end_date, deletion_flg)
    VALUES (1, 98, '2010-11-20', '2010-11-22', '2010-11-03', 'N'), 
           (1, 75, '2010-11-22', '2010-11-23', '2010-11-22', 'N'),
           (1, 98, '2010-11-23', '2010-11-25', '2010-11-23', 'N');
    EXEC MergeNewTasks; 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Basic sql update statement

    here are my columns:
    SQL> desc leaguetable;
    Name Null? Type
    LEAGUETABLEID NOT NULL NUMBER(8)
    TOURID NUMBER(8)
    TEAMNAME VARCHAR2(25)
    PLAYED NUMBER(3)
    WON NUMBER(3)
    LOST NUMBER(3)
    DRAW NUMBER(3)
    FORFOR NUMBER(3)
    AGAINST NUMBER(3)
    POINTS NUMBER(3)
    POSITION NUMBER(3)
    here is my update statement...
    Update LEAGUETABLE set played = 1, won = 1, forfor = 3, against = -2, points = 3 where tourid = 10 AND teamName = dundee ;
    here is my error...
    ERROR at line 1:
    ORA-00904: invalid column name
    i dont see anything wrong with my sql statement. any ideas?

    You put us (me) on the wrong track... ORA-00904 is "ORA-00904 string: invalid identifier" not invalid column name.
    But, there is your answer: value should be like "Dundee", with quotes.
    Example:
    SQL> desc leaguetable
    Name Null? Type
    LEAGUETABLEID NOT NULL NUMBER(8)
    TOURID NUMBER(8)
    TEAMNAME VARCHAR2(25)
    PLAYED NUMBER(3)
    WON NUMBER(3)
    LOST NUMBER(3)
    DRAW NUMBER(3)
    FORFOR NUMBER(3)
    AGAINST NUMBER(3)
    POINTS NUMBER(3)
    POSITION NUMBER(3)
    SQL> Update LEAGUETABLE set played = 1, won = 1, forfor = 3, against = -2, points = 3 where tourid =
    10 AND teamName = dundee ;
    ERROR at line 1:
    ORA-00904: "DUNDEE": invalid identifier
    SQL> Update LEAGUETABLE set played = 1, won = 1, forfor = 3, against = -2, points = 3 where tourid =
    10 and teamname = 'DUNDEE';
    1 row updated.

  • Updates using single SQL Update statement.

    Hi Guys,
    I had an interview... and was not able to give an answer of one of the question.
    Given the emp table... need to update the salary with following requirement using one SQL statement...
    1. Update salary+1000 for those employees who have salary between 500 and 1000
    2. Update salary+500 for those employees who have salary between 1001 and 1500
    Both above requirement should be done by using only one SQL update statement... can some one tell me how to do it?

    update emp
      set salary   = case when salary between 500 and 1000
                                then salary + 1000
                                when salary between 1001 and 1500
                                then salary + 500
                          end;Regards
    Arun

  • Regex help for SQL update statement

    Hello,
    need help from IPS regex guru - trying to build the signature to detect SQL update statement in HTTP requests.
    1) Am I correct with regex below specified as Request-Regex?
    [Uu][Pp][Dd][Aa][Tt][Ee]([%]20|[+])[\x20-\x7e]+[Ss][Ee][Tt]([%]20|[+])[\x20-\x7e]+=
    2) How do I make sure that it detects 'Update' in URI and Arguments only and not in the body on entire webserver response (currently looks like the case)?

    1) It looks correct to me
    2) Typically, the "service HTTP" engine is used to inspect requests and the "TCP string" engine is used to inspect HTTP server responses. If you only want to inspect requests, use the service HTTP engine.

  • Locking of sql update statement

    Hi,
    I want to execute this statement.
    UPDATE STUDENTS SET NAME='John' WHERE ST_ID=34;
    I have heard that DBMS systems lock the table or updated rows before updating.
    Does Oracle lock the whole STUDENTS table or just the updated row.
    Chamal.

    TEST>-- This is session 1
    TEST>CREATE TABLE STUDENTS
      2  (
      3  ST_ID NUMBER,
      4  NAME VARCHAR2(50 CHAR)
      5  );
    Table created.
    TEST>INSERT INTO STUDENTS VALUES (1,'A');
    1 row created.
    TEST>INSERT INTO STUDENTS VALUES (2,'B');
    1 row created.
    TEST>INSERT INTO STUDENTS VALUES (34,'John');
    1 row created.
    TEST>COMMIT;
    Commit complete.
    TEST>-- Now the update
    TEST>UPDATE STUDENTS SET NAME='Bill' WHERE ST_ID=34;
    1 row updated.
    TEST>-- I do not commit
    TEST>-- Rather, i'm going to open a nex session
    TEST>-- with the commit pending in this one.
    TEST>!
    oracle@test:/opt/oracle/Ora9i/yjam>sqlplus yjam
    SQL*Plus: Release 9.2.0.7.0 - Production on Ve Dec 23 13:22:17 2005
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Enter password:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    13:22:22 yjam:GNX.WORLD@gnx-test> set tim off timi off
    yjam:GNX.WORLD@gnx-test> TEST>
    TEST>update students set name='commit pending in session 1' where st_id=1;
    1 row updated.
    TEST>-- success.
    TEST>COMMIT;
    Commit complete.
    TEST>exit
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    oracle@test:/opt/oracle/Ora9i/yjam>exit
    TEST>-- commit still pending
    TEST>COMMIT;
    Commit complete.
    TEST>SELECT * FROM STUDENTS;
         ST_ID NAME
             1 commit pending in session 1
             2 B
            34 BillQ.E.D. /* Just for APC :-) */
    Yoann.

  • SQL UPDATE from PL/SQL triggered by button

    I have a form with the normal buttons (create/save/delete) working.
    For 2 of the fields I want to introduce a calculation on demand system. What I did is: created a button compute and associated some PL/SQL with it. The button submits as "compute" (something I made up) and has a branch that goes back to the same page. The button's PLSQL code is the following process (After Submit):
    DECLARE
      rasaDom VARCHAR2(2);
      pRasaDom NUMBER;
    BEGIN
    tRace(:APP_SESSION, to_number(:P5_K));
    domRace(:APP_SESSION, rasaDom, pRasaDom);
    if (pRasaDom > 0 and pRasaDom <= 100) then
         :P5_RASADOM := rasaDom;
         :P5_PRASADOM := pRasaDom;
         update BOVIS.S_CIV_F SET RASADOM=rasaDom, PRASADOM=pRasaDom where K = to_number(:P5_K);
         commit;
         wwv_flow.debug('THEN! rasaDom=' || rasaDom || ' %=' || pRasaDom);
    end if;
    END;
    The problem is the the above UPDATE simply does not work!
    I should also mention that:
    - the normal update process does not run (which is fine), because:
    0.03: ...Do not run process "Apply MRU", process point=AFTER_SUBMIT, condition type=REQUEST_IN_CONDITION, when button pressed=
    - my process displays the success message
    - the "then" debug message shows just fine.
    It looks like the is a big rollback somewhere (this is why I added the commit there). My guess is that APEX is doing an update to the old value. What am I doing wrong?
    Thanks!
    Edited by: Şerban on 12.02.2009 03:43

    Hello:
    update BOVIS.S_CIV_F SET RASADOM=rasaDom, PRASADOM=pRasaDom where K = to_number(:P5_K);Your update statement is updating the columns back to their current values !
    If you want the rasaDom and prasadom updated to what is contained in p5_rasadom & p5_prasadom your code should be
         update BOVIS.S_CIV_F SET RASADOM=:P5_RASADOM , PRASADOM=:P5_PRASADOM  where K = to_number(:P5_K);
    ....Varad
    Edited by: varad acharya on Feb 12, 2009 4:51 AM

  • In Oracle this SQL update tatement not working but in MS SQL it works

    Dear Friends,
    The following sql update statement work fine in MS sql server but not working in Oracle. Can you kindly suggest, What is wrong with this statement ? and is their any other way of achieving the same in Oracle.
    UPDATE INPUTSTREET SET EDIT_FLAGS=S.EDIT_FLAGS From INPUTSTREET G, INPUT_SEGBASE S Where G.GEOKEY=S.GEOKEY
    This statement give error in Oralce saying - Statement not ended properly
    Cheers,
    Vinay

    You would normally write
    UPDATE inputStreet g
       SET edit_flags = (SELECT s.edit_flags
                           FROM input_segbase s
                          WHERE s.geokey = g.geokey)If you don't want to update all the rows in inputStreet, you can add a WHERE EXISTS clause.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Data Manager : SQL Update Error

    HI Gurus,
    In Data Manager,
    we are trying to execute assignment on 900 records at once, assignment working fine when we split it in to 300 inbatch, but it gives assignment execution failed : SQL Update error, while we execute on 900 records in a streach. we are wondering what causes this error when it is executed more than 400 records. please through some lights on this.
    Note: Assignment got one IF conditon , IF (expression,value), here expression got <conditon1> OR <condition2> OR <condition3>...... OR <Consition35>
    Thanks in advace

    Hi,
    I feel you are getting this error because the assignment which you are trying to execute is little complex, and database does not have sufficient resources at that point to execute the SQL statement. I feel,  this will be happening on irregular basis.
    Please check below document for more details about cause and actions (page no 210)
    [IBM DB2 Universal Database Message reference|ftp://ftp.software.ibm.com/ps/products/db2/info/vr5/db2m0e50.pdf]
    Best Regards,
    Shiv

  • How to run update query statement to update a table cell

    I have a job within that has dataflow which loads data to target after teh dataflow is done loading, i would like to call to run the following: in the workflow context do i need to add a script object , plus also the below query is it the proper way to run an update statement.
    sql('Target_DS','update tbl_job_status set endtime=sysdate() where endtime is null');
    Thank you very much for the helpful info
    kind regards.

    Arun,
    Is this the right way instead of doing enable recovery.
    Manaully taking care of recoverable workflow logic, by updating a table_job_status(starttime and end_time columns)?
    the only advantage of going this way rather than using recover as a unit is, if i use recover as a unit.
    then if any problem occurs in any dataflow, then all the dataflow one more time gets executed.
    instead i want only the data flow with the error occur has to run. for delta's.
    Kind regards.
    Edited by: cplusplus1 on Feb 13, 2012 4:21 PM

  • HELP!!! Can't use sql:update in Netbeans Visual Web JSP

    I use Netbeans Visual Web in my project. I use Java DB database and Sun Java System Application Server 9.
    When i run my project, there is an error "The server encountered an internal error () that prevented it from fulfilling this request."
    Here is the codes:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:sql="http://java.sun.com/jsp/jstl/sql" >
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
    <ui:page binding="#{Page1.page1}" id="page1">
    <sql:update var="indata" dataSource="datasource">
    INSERT INTO "NBUSER"."user" ("Username") VALUES('jacky')
    </sql:update>
    <ui:html binding="#{Page1.html1}" id="html1">
    <ui:head binding="#{Page1.head1}" id="head1">
    <ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
    </ui:head>
    <ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
    <ui:form binding="#{Page1.form1}" id="form1"/>
    </ui:body>
    </ui:html>
    </ui:page>
    </f:view>
    </jsp:root>
    I can't store the data "jacky" into "Username" column in "user" table in database. Can anyone please let me know where is my mistake. Thanks.

    Maybe that SQL statement isn't valid. All those quotes look weird to me, but don't take that as meaning they are wrong. You should look in your server's logs to find out the actual error that occurred, rather than trying to guess what's wrong.

  • Need a simple  UPDATE statement for updating areas of the polygons

    Hi,
    I need a simple UPDATE SQL statement for updating areas of the polygons in a table shema.table (geom) with sdo_area function.
    Dejan

    Dejan,
    Maybe I don't understand your question but I will offer this:
    update SOME_TABLE t set t.areasqft = SDO_GEOM.SDO_AREA(GEOM, 0.005) where t.geom.GET_GTYPE() = 3
    This assumes a "feet" based SRID.
    r,
    dennis
    Edited by: user633187 on Dec 1, 2008 9:04 AM

  • Aspect logging - ie, trigger logging of sql:update

    Is it possible to...somehow attach an aspect to a JSTL action?
    In other words,
    like, for every
    </sql:update> tag, could I somehow trigger some code to log the query that was executed?
    I would love to add logging to all non SELECT statements to my app, and if there is an easy way to ... say, wrap the SQL tld, that would be great!

    Can Log4j do this?
    http://logging.apache.org/log4j/docs/index.html

  • JSP sql:update how to commit.

    Can any body tell me how to do a commit in JSP. I am using the book JavaServer Pages book of O'relly
    as a frame work for a web page using JSP. Everything works great for select etc. However when I try to use examples with <sql:update Employee etc.... it seems that it works but when I look at the data base
    or do a <c:redirect> statement it doesn't seem to update the table. I am guessing that I need to do a commit before leaving my jsp page. Does any body know what can I do?
    Thanks
    Frank.

    what database are you using, Access?
    Try closing the statement and connection when your update is done.

Maybe you are looking for

  • Firefox url goes grey, and back button no longer works.

    Ok so most annoying problem EVER!! Ok so I have this problem where I will be running firefox, browsing the net, and then all of the sudden the url bar will grey out and only the domain root will be solid. Once it does this, I cannot use the back butt

  • Cheaper way to stream to my HDMI tv without apple tv?

    Anyone know a cheaper option for streaming tv video and music from my mac to a TV in another room it is not connected to? I currently stream to one tv with a mac mini connected or to my macbook. I have just purchased a new tv but cant afford apple tv

  • Can we return a Array of varchar2 from a function ?

    Hello, i have a sql query that returns some rows. I want to define that query inside a function and want to retrieve the results in an array .Finally i want to retrieve those values in array in my .NET runtime . How can i achieve this ?

  • Messages are Archived but cannot be seen in Outbound Interface in RWB

    Hi Experts, I am having File to RFC scenario......where files are successfully pinged from FTP server and getting archived..... but when I check in RWB the files are not found in Outbound Interface in Message Monitoring........... Then I am deleting

  • Admin server cannot Re-discover the managed server

    Hi,           mypc) win2k version 6.0 sp2, ip=192.168.1.108:7001 (being an admin           server)           abpqa1) solaris8 version 6.0sp2, ip=192.168.3.20:8888 adm port:1755           abpqa2) solaris8 version 6.0sp2, ip=192.1683.2:8888 admport:175