Conditional Extract (based on changes in another table)

Hi guys,
I have a question for nightly (incremental) loads. I want to select from certain tables even if there are updates to another table.
For example, I nightly pull any changes (or new records) from table 1, 2, 3, 4, & 5.
But, if table 1 has no changes, I still want to pull matching records from it if there are changes to any of the others.
And similarly, I want to pull matching records from table 2 if there are changes to any of the others.
Assume that the Last_update field is available in the source tables. (This is necessary for pulling key columns to match for updates.)
Thanks.

can you explain in details .?

Similar Messages

  • Deleting Records based on status in another table

    Dear All,
    I am using oracle 11gR1 on Linux.
    We have two tables one holding year starting and closing dates with year status as open/closed for multiple years and multiple entities. Any year may be open for an entity.
    Relevant columns/Pk
    PK: entity_id, fin_year_id
    Cols: year_st_dt, year_end_dt, year_status
    We have another table where monthly summarized information is stored via scheduled procedure. Currently the procedure deletes all records and inserts new records.
    Relevant columns/Pk
    Cols: entity_id, year_month
    What we want is that the procedure should not delete records that related to financial years that are closed.
    How would I write a delete statement to do that?
    Regards, Imran

    Hi,
    957 posts, but still while posting a question, you have not
    1) Posted the table structure of all the tables involved. (create statement)
    2) Posted the sample input (insert statement)
    3) Posted the sample output.
    4) More importantanly posted on the correct forum.
    Regards
    Anurag Tibrewal.

  • Inserting values in atable based on values in another table

    Hi,
    We receive data from our customers as follows AB784589456. This is the starting value for an serial number of a product. We also receive a quantity. I need to be able to populate rows in another table to start with AB784589456 and then add an additional
    row to the value of the quantity. So the first row in the second table would be AB784589456, the second AB784589457, AB784589458, etc until the number has been incremented to the value of the quantity.
    Order Number     SerialNo
    234                     AB784589456
    234                     AB784589457
    234                     AB784589458
    The datatype of the SerialNo is Varchar(14)
    Any help would be appreciated
    Thanks

    Assuming the serial value format is consistent ie alphabet followed by numeric you can use this
    DECLARE @Serial varchar(14) = 'AB784589456', @Quantity int = 15
    ;With N1
    AS
    SELECT 1 N UNION ALL SELECT 1 UNION ALL SELECT 1
    ),N2
    AS
    SELECT 1 N FROM N1 t1 CROSS JOIN N1 t2
    ),N3
    AS
    SELECT 1 N FROM N2 t1 CROSS JOIN N2 t2 CROSS JOIN N2 t3
    ),N4
    AS
    (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 1)) AS Seq
    FROM N3
    INSERT INTO YourTable (OrderNumber,SerialNo)
    SELECT OrderNumber,LEFT(@Serial,PATINDEX('%[0-9]%',@Serial)-1) + CAST(STUFF(@Serial,1,PATINDEX('%[0-9]%',@Serial)-1,'') + Seq -1 AS varchar(11))
    FROM Table1 t
    CROSS JOIN N4 n
    WHERE n.Seq BETWEEN 1 AND @Quantity
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Set Default Value based on Field from another table for a custom object

    I'm trying to set the default value on a custom object field to the value of an account field. I have tried the syntax 50 different ways, and just am getting no where. The account field label displays as DBA, the integration tag is ltDBA_ACCT, and it shows up in reporting fx area as Account.Text_22.
    The custom object field I'm triying to update is also called DBA, which was originally the "NAME" required field. Does the table name, Account, have to be included? Do I need a function in front of the field?
    I have been updating the external ID using the row ID with syntex <ID> (Less than ID greater than) so I know it is possible to set the Default Value, but <DBA>, <ltDBA_ACCT>, "Account"."DBA", and so on just don't not work.
    If anyone knows how to enter this I'd really appreciate the help.

    Ok, so if you want to default a field to the value from another object, you have to use the JoinFieldValue function. I think you understand that, based on your original post, but I want to be sure that you do.
    Next, this will only work as a default if the record is created from the object that you wish to join on because a default works at record creation and the ID needs to be available for it to work properly. It will not work if you choose the related object record after the custom object record is created. You could set the value as a post-default, but that does not seem to meet your requirements.
    The syntax for the Default Value would be as follows: JoinFieldValue(ref_record_type, foreign_key, field_name).
    In your case, ref_record_type is '<Account>', foreign_key is &#91;<AccountId>&#93;, and field_name is '<YourFieldName>'. The best way to determine what the field name is would be to create a new workflow for Account and use the Workflow Rule Condition expression builder to pick your field ("DBA") from the list. The value that is returned by the expression builder should be placed in the field_name variable in the JoinFieldValue function (minus the brackets and in single quotes).
    Give this a shot and let me know how you do.
    Thom

  • Convert numeric value to display as text based on record in another table? ASP/VB

    I have an orders table:
    orderID (PK)
    pickupname
    pickupaddress
    pickupregion (numeric)
    pickuppostcode
    deliveryname
    deliveryaddress
    deliveryregion (numeric)
    deliverypostcode
    I also have a regions table:
    regionID
    regionname
    On my ASP page, I would like to display the pickup and
    delivery addresses as
    follows, but also need this to be within a repeat region as I
    am displaying
    a number of orders on the page (I have wrapped what I want in
    the repeat
    region in dashes, below):
    ---------Repeat Region Start-----------
    Pickup Address:
    Name
    Address
    Region (pickupregion)
    Postcode
    Delivery Address:
    Name
    Address
    Region (deliveryregion)
    Postcode
    --------Repeat Region End------------
    As it displays at the moment, I get this (using sample data):
    ---------Repeat Region Start-----------
    Pickup Address:
    Joe Bloggs
    High Street
    12
    HT12 5TY
    Delivery Address:
    Jane Bloggs
    The Mall
    33
    DT6 5TG
    --------Repeat Region End------------
    Is there any way to convert these numeric values to the
    actual region name
    but to keep it within one recordset so that I can use the
    repeat region? I
    tried creating a recordset for regions (SELECT regionID,
    regionname FROM
    tblRegions WHERE regionID = pickupregion OR regionID =
    deliveryregion), but,
    because I'm not repeating this region, it just displays the
    same regional
    name for every order, albeit the first record returned does
    contain the
    correct values! :o)
    I was thinking about some kind of inner join, but it's having
    two numeric
    region fields in the orders table that is causing me
    headaches! PS. I need
    to keep the two addresses within one orders table - I had
    thought of that!
    Got me a bit stumped, I have to say. Any help would be
    greatly appreciated.
    Thanks.
    Regards
    Nath.

    I've tried this one already.
    I tried to leave it blank, & nbsp ; , text,... but the problem is that our lov is build by a function and it always returns a query, so the LOV is never null.
    I figured something out: made a process after header that has some cursors to get the values from the database and changed the item to a simple display as text-field. There were only 4 that were wrong, so it wasn't to much work.

  • Select LOV based on value in another table

    Hi all,
    I have an issue,
    I have an item with Select list with dynamic query in the dropdown ListofValues.
    but i want to use a condition like
    select val1 display_value val2 return_value
    from table2
    where value_in_table1 = username AND table_id1=table_id2
    in these two tables i have the id's common and table 1 is having the usernames.
    Can somebody help me in solving this issue please.
    Thanks in advance

    As far as I know, you can't dump PL/SQL into the list of values definition. Try just having select distinct PJT_NAME display_value, PROJECT_ID return_value from EZS_PROJECTS WHERE EMP_ID = :P1_XYZ ORDER BY 1

  • Sum Fields based on change in another field

    I have data that looks like this
    <Records>
    <VBLEN>123</VBLEN>
    <MATNR>012356</MATNR>
    <ZSPR>1.02</VBLEN>
    </Records>
    <Records>
    <VBLEN>123</VBLEN>
    <MATNR>568954</MATNR>
    <ZSPR>2.05</ZSPR>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR>259865</MATNR>
    <ZSPR>5.98</ZSPR>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR>359874</MATNR>
    <ZSPR>4.12</ZPSR>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR>985698</MATNR>
    <ZSPR>1.06</ZSPR>
    </Records>
    In my output, I have a field on every line that is a total. So My output needs to look like this.
    <Records>
    <VBLEN>123</VBLEN>
    <MATNR>012356<MATNR>
    <ZSPR_TOTAL>3.07</ZSPR_TOTAL>
    </Records>
    <Records>
    <VBELN>123</VBLEN>
    <MATNR>568954</MATNR>
    <ZSPR_TOTAL>3.07<ZSPR_TOTAL>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR>259865</MATNR>
    <ZSPR_TOTAL>11.16</ZPSR_TOTAL>
    </Records>
    <VBLEN>856</VBLEN>
    <MATNR>359874</MATNR>
    <ZSPR_TOTAL>11.16</ZSPR_TOTAL>
    </Records>
    <Records>
    <VBLEN>856</VBLEN>
    <MATNR985698</MATNR>
    <ZSPR_TOTAL>11.16</ZSPR_TOTAL>
    So I need the sum of ZSPR on each line, but it has to be the sum of ZSPR for each instance of VBLEN.

    Hi Dave,
    If you are using below graphical mapping logic , you have to apply some logic (shown below ) for remaining fields of output.
    For getting Total sum  value based on VBLEN :
    For arranging remaining fields of output xml :
    Note : ZSPR_TOTAL is mentioned as Total.
    Thanks
    Hari.

  • How to populate change from one Table cell to more Tables??

    Dear Friends:
    I have following successfully running code, each can populate 1 table cell updating in ChangeTableSelectionMain1 change to another table in ChangeTableSelectionMain1 also, or populate 1 table cell in ChangeTableSelectionSub1 change to another table in ChangeTableSelectionSub1 also, But cannot populate table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1, Please advice how to make populating table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1 successful??
    Thanks.
    [1]. main code:
    package com.com;
    import java.awt.BorderLayout;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JSplitPane;
    import java.awt.GridLayout;
    public class ChangeTableControl1 implements java.io.Serializable{
         private JFrame                frame;
         public static void main(String args[]) {
              try {
                   ChangeTableControl1 window = new ChangeTableControl1();
                   window.frame.setVisible(true);
              } catch (Exception e) {
                   e.printStackTrace();
          * Create the application
         public ChangeTableControl1() {
              initialize();
          * Initialize the contents of the frame
         private void initialize() {
              frame = new JFrame();
              frame.setBounds(0, 0, 1500, 675);
              final ChangeTableSelectionMain1      c1      = new ChangeTableSelectionMain1();
              final ChangeTableSelectionSub1           c2      = new ChangeTableSelectionSub1();
              JSplitPane sp = new JSplitPane();          
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              final JPanel panel = new JPanel();
              panel.setLayout(new GridLayout(1, 2));
              frame.getContentPane().add(panel, BorderLayout.CENTER);
              sp.setLeftComponent(c1);
              sp.setRightComponent(c2);
              sp.setResizeWeight(0.5);
              panel.add(sp);// add right part
                frame.addWindowListener(new WindowAdapter() {
                     public void windowClosing(WindowEvent e) {
                         System.exit(0);
                 frame.pack();
                 frame.setVisible(true);
    }[2]. ChangeTableSelectionSub1
    package com.com;
    import javax.swing.JTable;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.event.TableModelEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import java.awt.FlowLayout;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;
    import java.text.SimpleDateFormat;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.awt.BorderLayout;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    public class ChangeTableSelectionSub1 extends JPanel{
           protected         JButton                bt11 = new JButton("Insert before");
           protected         JButton                bt22 = new JButton("Insert after");
           protected         JButton                bt33 = new JButton("Delete");
           protected      ChangeTableSelectionMain1 lm = new ChangeTableSelectionMain1();
    public ChangeTableSelectionSub1() {
         JPanel pnl = new JPanel();
         pnl.setMinimumSize(new Dimension(200,600));
              //pnl.setPreferredSize(new Dimension(800,600));
              final JTable tbl1 = new JTable(lm.data,lm.columnNames);
              final JTable tbl2 = new JTable(lm.data,lm.columnNames);
              JScrollPane scr1 = new JScrollPane(tbl1);
              JScrollPane scr2 = new JScrollPane(tbl2);
              lm.tbl1.getSelectionModel().addListSelectionListener(new ListSelectionListener()
              public void valueChanged(ListSelectionEvent lse)
                   if (lm.tbl1.getSelectedRow()!=-1)
                        tbl2.clearSelection();
                        System.out.print("[1]. LongguChangeTableSelectionSub get msg from LongguChangeTableSelectionMain");
                        tbl1.clearSelection();
                        revalidate();
              lm.tbl2.getSelectionModel().addListSelectionListener(new ListSelectionListener()
         public void valueChanged(ListSelectionEvent lse)
              if (tbl2.getSelectedRow()!=-1)
                   tbl1.clearSelection();
              System.out.print("[2]. LongguChangeTableSelectionSub get msg from LongguChangeTableSelectionMain");
              revalidate();
         pnl.setLayout(new FlowLayout());
         pnl.add(scr1);
         pnl.add(scr2);
         this.add(pnl);
    public static void main(String []args)
         ChangeTableSelectionSub1 c = new ChangeTableSelectionSub1();
         JFrame frm = new JFrame();
         frm.setSize(920,400);
         frm.getContentPane().add(c);
         frm.setVisible(true);
    }[3]. ChangeTableSelectionMain1
    package com.com;
    import javax.swing.JTable;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.JScrollPane;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import java.awt.FlowLayout;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.*;
    import javax.swing.*;
    public class ChangeTableSelectionMain1 extends JPanel{
           protected         JButton                bt11 = new JButton("Insert before");
           protected         JButton                bt22 = new JButton("Insert after");
           protected         JButton                bt33 = new JButton("Delete");
           protected String[] columnNames = {"First Name",
                        "Last Name",
                        "Sport",
                        "# of Years",
                        "Vegetarian"};
           protected Object[][] data = {
              {"Mary", "Campione","Snowboarding", new Integer(5), new Boolean(false)},
              {"Alison", "Huml","Rowing", new Integer(3), new Boolean(true)},
              {"Kathy", "Walrath","Knitting", new Integer(2), new Boolean(false)},
              {"Sharon", "Zakhour","Speed reading", new Integer(20), new Boolean(true)},
              {"Philip", "Milne","Pool", new Integer(10), new Boolean(false)} };
           protected JTable tbl1 = new JTable(data,columnNames);
           protected JTable tbl2 = new JTable(data,columnNames);
    public ChangeTableSelectionMain1() {
         JPanel pnl = new JPanel();
         pnl.setMinimumSize(new Dimension(200,600));
              //pnl.setPreferredSize(new Dimension(800,600));
              JScrollPane scr1 = new JScrollPane(tbl1);
              JScrollPane scr2 = new JScrollPane(tbl2);
              tbl1.getSelectionModel().addListSelectionListener(new ListSelectionListener()
              public void valueChanged(ListSelectionEvent lse)
                   if (tbl1.getSelectedRow()!=-1)
                        tbl2.clearSelection();
                   if (lse.getValueIsAdjusting())
                       System.out.println("Selected from " + lse.getFirstIndex() + " to " + lse.getLastIndex());
                   revalidate();             
              tbl2.getSelectionModel().addListSelectionListener(new ListSelectionListener()
         public void valueChanged(ListSelectionEvent lse)
              if (tbl2.getSelectedRow()!=-1)
                   tbl1.clearSelection();
                   revalidate();
         pnl.setLayout(new FlowLayout());
         pnl.add(scr1);
         pnl.add(scr2);
         this.add(pnl);
    public static void main(String []args)
         ChangeTableSelectionMain1 c = new ChangeTableSelectionMain1();
         JFrame frm = new JFrame();
         frm.setSize(920,400);
         frm.getContentPane().add(c);
         frm.setVisible(true);
    }Message was edited by:
    sunnymanman

    I have following successfully running code, each can populate 1 table cell updating in ChangeTableSelectionMain1 change to another table in ChangeTableSelectionMain1 also, or populate 1 table cell in ChangeTableSelectionSub1 change to another table in ChangeTableSelectionSub1 also, But cannot populate table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1, Please advice how to make populating table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1 successful??
    My brain hurts, does yours?

  • Conditional inclusion of column cells based on value in another column?

    I was wondering if something like the following is possible -- I've looked through the forums and Numbers user guide but can't figure it out:
    Suppose I have a column A of sales figures, and columns B and C which basically have different attributes (say, color (yellow or green), size (small or large), and material (cotton or polyester)).
    I want to run basic statistics on various combinations: e.g. all yellow items regardless of size, all green cotton items regardless of size, all large yellow items regardless of material, etc.
    I want to be able to specify something like this:
    'Compute the average of every cell in column A where column B=="green" and column C=="large"'
    Is there a good way to go about doing this? Would I want to attack the problem using categories, sorting, and multiple tables? Or is there a way to conditionally include cell values from a range based on the value of that row's cell in another column?
    Thanks for any help.

    All I can think of to solve the quartile and median functions is to have another table of the same size as your original table that gets populated with just the items that match. Then you can do the quartile and median (and average) on that table. It's a one-at-a-time affair; you can only do one selection of size, color, and/or material at a time but you can get the median, mean, and quartiles of it. Of course, you could have multiple copies of this second table if you want to do more than one comparison at a time.
    In the attached file, unhide the hidden rows in Table 2 to see the formulas that do all the work.
    [files.me.com/pwb3/6hobt0.numbers.zip]
    Message was edited by: Badunit
    Message was edited by: Badunit

  • Data from another table, to be displayed on table based screen

    I have a block that is based on one table, if I found the record(s) on that table I will display it on the forms, No Problemo. But, if record(s) was not in the said table, I have to get the data on another table and then display it on the same forms. Is there someone who can show me how I can get the data from another table and display it on screen that is based on another table?

    suppose you have 2 table emp_n and emp with same table structure
    first check data from emp_n if not found then go to emp
    try it:-
    you will change block name at run time(query data source)
    by
    emp_n is old
    emp is new
    set_block_property('emp_n',QUERY_DATA_SOURCE_NAME,'emp');
    if no data found in emp_n table then
    change the block query name by
    set_block_property('emp_n',QUERY_DATA_SOURCE_NAME,'emp');
    in next try it will go to emp table for fetching record
    kuljeet pal singh

  • Approaches to transfer changed data from a table to another table

    Hello expert,
    will you please show me all approaches to automatically detect and transfer changed data from a table to another table ? I don't need detail information, but a little comment for those approaches are more welcome.
    Many Thanks,
    Edited by: 843178 on 19-Dec-2011 2:04 PM

    You will want to review information on replication and similar methods
    In a nutshell:
    Replication allowed data to exist at more than one site and take the Master / original table data and clone it at a different site
    As tranporting all of the table data to a remote / clone site got more and more expensive we developed a method
    to identify just the 'diffs' and only send those from the master to the clone which needed only the diffs to become a clone of the master table
    This has many methods and options, but looking under key words such as
    - distributed transations
    - materialized views
    - replication
    ... are a few categories that will get you started

  • How to populate a table based on a row selection from another table.

    Hi, i just started to use ADF BC and Faces. Could some one help me or point me a solution on the following scenario .
    By using a search component , a table is being displayed as a search result. If i select any row in the resulted table , i need to populate an another table at the bottom of the same page from another view. These two tables are related by primary key . May i know how to populate a table based on a row selection from another table. Thanks
    ganesh

    I understand your requirement and the tutorial doesn't talk about Association between the views so that you can create a Master-Detail or in DB parlance, a Parent-Child relationship.
    I will assume that we are dealing with two entities here: Department and Employees where a particular Department has many Employees and hence a Parent-Child relationship.
    Firstly, you need to create an Association between the two Entities - Department and Employees. You can do that by right clicking on the model's entity and then associating the two entities with the appropriate key say, DepartmentId.
    Once you have done that, you need to link the two entities in the View section with this Association that you created. Then go to AppModule and make sure that in the Available View Objects: 'EmployeesView' appears under 'DepartmentView' as "EmployeesView via <link you created>". Shuttle the 'DepartmentView' to the right, Data Model and then shuttle
    "EmployeesView via <link you created>" to the right, Data Model under 'DepartmentView'.
    This will then be reflected in your Data Controls. After that, you simply would have to drag this View into your page as a Master-Detail form...and then when you run this page, any row selected in the Master table, would display the data in the Detail table.
    Also, refer to this link: [Master-Detail|http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html]
    Hope this helps.

  • Insert values to one table based on a value inserted into another table

    Hi,
    I've got a form based off a report which creates a new project. I've added an additional process to this form to insert four new values into another table as soon as the new project is created and the PK for that project is generated. This was working last week (of course!) and now seems to not work at all. It's complaining that the PK I was getting from my first insert was null. Here is one the the statements in my process I'm trying to run:
    insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER);
    The complaint I get that it's getting null where :P45_PROJECT_SEQ should be.
    Thoughts?
    Thanks,
    Jon

    Hi Andy,
    Thanks for the tip. Those two values didn't match and I updated them so they do and I'm still getting a "cannot insert NULL..." error.
    When I turn on debug I see that I'm getting the PK and I see the value. Here's my debug output:
    0.24: ...Process "Get PK": PLSQL (AFTER_SUBMIT) declare function get_pk return varchar2 is begin for c1 in (select PROJECT_SEQ.nextval next_val from dual) loop return c1.next_val; end loop; end; begin :P45_PROJECT_SEQ := get_pk; end;
    0.25: ...Session State: Saved Item "P45_PROJECT_SEQ" New Value="252"
    0.25: ...Process "Process Row of PROJECT": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:PROJECT:P45_PROJECT_SEQ:PROJECT_SEQ|IUD
    0.26: ...Session State: Save "P45_PROJECT_SEQ" - saving same value: "252"
    0.26: ...Process "reset page": CLEAR_CACHE_FOR_PAGES (AFTER_SUBMIT) 45
    0.27: Nulling cache for application "120" page: 45
    0.27: ...Process "Add Week Groups": PLSQL (AFTER_SUBMIT) insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER); insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY') +
    0.28: Encountered unhandled exception in process type PLSQL
    0.28: Show ERROR page...
    0.28: Performing rollback...
    I notice that when it runs my process "Add Week Groups" it's not displaying all of the SQL. But the SQL is fine, it's right here:
    insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER);
    Hmmm....what about the "reset page" action in the last of the 0.26 lines?
    Thanks,
    Jon

  • How to update one table based on another table ??

    Hello Friends:
    I am trying to run the following query in oracle but it won't run.
    UPDATE BOYS
    SET
    BOYS.AGE = GIRLS.AGE
    FROM GIRLS
    WHERE
    BOYS.FIRSTNAME = GIRLS.FIRSTNAME AND
    BOYS.LASTNAME = GIRLS.LASTNAME;
    This query runs fine in sql server but in oracle its saying can't find "SET". PLease tell me what is the correct syntax in oracle to update one table based on another table.
    thanks

    See if this helps.
    If you wrote an SQL statement:
    update boys set age = 10;
    Every row in the boys table will get updated with an age of 10. But if you wrote:
    update boys set age = 10
    where firstname = 'Joe';
    Then only the rows where the firstname is Joe would be updated with an age of 10.
    Now replace the 10 in the above statements with (select g.age from girls g where g.firstname = b.firstname and g.lastname = b.lastname) and replace where firstname = 'Joe' in the second statement with where exists (select null from girls g where g.firstname = b.firstname and g.lastname = b.lastname). The same concepts apply whether 10 is an actual value or a query and whether you have a where clause with the update statement to limit rows being updated.
    About the select null question regarding the outer where clause:
    Since the query is checking to see if the row in the girls table exists in the boys table what the column is in this select statement doesn't matter, this column isn't being used anywhere. In this case Todd chose to use null. He could have also used a column name from the table or a lot of times you'll see the literal value 1 used here.

  • Best way to create a table based on another table

    Hello,
    I am trying to create a table based on another table with all the data in it. It has large data.
    create table <tablename> as select * from table1.
    Is this the best way of doing it or is there any other way. please advice.
    thanks

    I am suggested to create new table as
    create table <newtable> as
    select * from <oldtable> where rownum < 1;
    then
    alter table <newtable> compress;
    then
    insert /*+ append */ into <newtable> as select * from <oldtable>;
    but i getting an error saying missing values key words ora- 00926.
    please advice

Maybe you are looking for

  • Cannot sign in into app store on iPhone after updating to iOS 8.2

    Hello guys, I'm having a problem here, I wonder if anyone else has this problem too and also have a solution for it. so, I tried to restore my iPhone by iCloud backup.. everything seemed to work well until I did chose the backup I want, after that an

  • How i can delete an external binary message (perharps a virus) visible on nvram commands- Except nvram-d or resetting the PRAM.

    An external binary message or an internet virus that blocks my computer, locked in the internal memory. That's my little question for the incredible problem to use normally the computer, and I wish if I had an answer and understand the origin of thin

  • B550 Fn-key doesnt work

    hi i recently bought a lenovo b550. but i got a problem with the function, which you can use by pressing fn + the key with the right orange icon. for example the upper keys on the F1-F12 buttons dont work. the sound +/- on the cursor keys do work, bu

  • Fake Adobe 24/7 help tech's

    Hi:    This is a warning. I posted an issue here on Friday and was contacted on Saturday via e:mail. The claimed to be with Adobe24/7 help requested to connect on Skype messaging. The icon on the  Skype was Adobe helps.     This tech and one that pho

  • Saving a interactive pdf.

    Hello, I followed this https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/offline%20interactive%20pdf%20form%20using%20download.pdf to design a offline interactive pd