Fill table with result group discount

Hello world

I need a little help.

I'm working on an Oracle 10.2.0.4 on windows.

I have a table I created like this:
Table name: DIM_REPLICA

COD_SEZ VCHAR2 (2)
NOME_SEZ VCHAR2 (20)
FLAG TANK (1)
DATE OF D_REPLICA

This DB I have 210 discount groups running every night. I need fill this table with the results of the refresh groups.

So when the refresh for example called ROME group runs I need to write on the table the name ROME in the field "NOME_SEZ", a Y or N if the refresh Group has worked in the field of the INDICATOR and LAST_DATE refresh force ran into the field of the D_REPLICA. The COD_SEZ field is a code that I get other things. It is not necessary for the moment. I can add it myself on my own.

Can someone help me please?

I was looking on the tables SYS DBA_JOBS and DBA_REFRESH these data, but I don't know what to take and how to fill the table. Trigger? Procedure? Any help will be great!

Thank you all in advance!

It is not tested, but here's the basic approach. (I'm in 11.1.0.7).

select r.refgroup nome_sez,
       decode(j.failures,0,'Y','N') flag,
       last_date d_replica
  from dba_refresh r,
       dba_jobs j
 where r.job=j.job;

Personally, I would create this as a view having up-to-date information, rather than maintaining a separate on my own table.

Tags: Database

Similar Questions

  • How can you fill ListBox with channel group name dynamically?

    I built a GUI in the 'View' pane that acts as a large table of contents. At the top of the GUI, there is a list box I want to dynamically fill with Group channel names loaded in my data portal (internal data). I can't generate the necessary code to do this. Currently, I use a ListBox control. Can I use an EnumListBox instead?

    The purpose of the list box should allow fast loading data which must be analysed in several sheets (also in the part of 'View') for comparison side by side rather than drag and drop data into each individual record.

    Any help would be appreciated,

    Thank you

    ~ Nathan

    Attached is a screenshot of the GUI I hope it helps.

    Hey Nathan--

    Have we met yet?  Don't think that I will remember to see you post on the forums of tiara so far (or remember you I meet someone named Nathan in person recently).  Welcome to the forums of tiara!

    There are a few things that you need to change about your code snippet-

    1. The reason why you get the error "object required: ' [string: 'filename']' is because the Set command expects that the right side of an expression returns an object (you define your variable to)."  In your case, you return a string (the name of a group), not an object.  Simply remove the Set command.

    2. The ListBox.Items.Add () method requires two parameters - the first is the text of the item to insert in the list, and the second is a value to assign to this point (you can do single).

    As a result, to more directly match your code snippet to the labour code, follow these steps:

    Dim listNum, names
    We = 1 to GroupCount
    Name = GroupName (listNum)
    Call selectData.Items.Add (names, we)
    NEXT

    Note that you can also use object programming oriented with the data object that represents the data portal, it is easier for you to avoid remembering variables such as GroupCount and GroupName DIAdem (that's me):

    Dim listNum
    We = 1 to Data.Root.ChannelGroups.Count
    Dial selectData.Items.Add (Data.Root.ChannelGroups (listNum). Name, we)
    NEXT

    Your project is looking great - let us know how we can continue to help and keep us updated!

  • Fill a table with the results of the refresh groups

    Hello world

    I need a little help.

    I'm working on an Oracle 10.2.0.4 on windows.

    I have a table I created like this:
    Table name: DIM_REPLICA

    COD_SEZ VCHAR2 (2)
    NOME_SEZ VCHAR2 (20)
    FLAG TANK (1)
    DATE OF D_REPLICA

    This DB I have 210 discount groups running every night. I need fill this table with the results of the refresh groups.

    So when the refresh for example called ROME group runs I need to write on the table the name ROME in the field "NOME_SEZ", a Y or N if the refresh Group has worked in the field of the INDICATOR and LAST_DATE refresh force ran into the field of the D_REPLICA. The COD_SEZ field is a code that I get other things. It is not necessary for the moment. I can add it myself on my own.

    Can someone help me please?

    I was looking on the tables SYS DBA_JOBS and DBA_REFRESH these data, but I don't know what to take and how to fill the table. Trigger? Procedure? Any help will be great!

    Thank you all in advance!

    This forum is for SQL * PLus, questions and your question is about general issues Oracle. You will get a better response by posting your question in another forum - probably the General database instance.

    Please close this thread and start over in another forum.

  • Can fill us transitional attribute in the table with no serial like 1,2,3, etc.? And how?

    Mr President.

    Can fill us transitional attribute in the table with no serial like 1,2,3, etc.? And how?

    Concerning

    You want to show serial No. on the page for all the lines?

    Check once-

    Blog of Ashish Awasthi (Jdev/ADF): Add the serial number to the table of the ADF, column to auto-increment in the table to the ADF

    Actually transitional attribute loses its value when page refreshes or viewObject is not appropriate in this case if your use case is different, so please tell us

    Ashish

  • ADF: How to fill a column in a table with a specific color

    Hi all
    I want to fill the cells of table with different colors based on the value (for example: 10, 40...) in this cell output text area.
    Help, please.

    Rognard

    Hello

    You can use the same code for the inlinestyle column: but it will color the entire column


    headerText = "#{bindings." EmployeesView1.hints.Salary.label}.
    ID = "c9".
    inlineStyle = "#{yourconAttr > 10?'" background-color: Red;': ' background-color: Orange ;'} ">}"

  • BAD RESULTS WITH OUTER JOINS AND TABLES WITH A CHECK CONSTRAINT

    HII All,
    Could any such a me when we encounter this bug? Please help me with a simple example so that I can search for them in my PB.


    Bug:-8447623

    Bug / / Desc: BAD RESULTS WITH OUTER JOINS AND TABLES WITH a CHECK CONSTRAINT


    I ran the outer joins with check queries constraint 11G 11.1.0.7.0 and 10 g 2, but the result is the same. Need to know the scenario where I will face this bug of your experts and people who have already experienced this bug.


    Version: -.
    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0      Production
    TNS for Solaris: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production

    Why do you not use the description of the bug test case in Metalink (we obviously can't post it here because it would violate the copyright of Metalink)? Your test case is not a candidate for the elimination of the join, so he did not have the bug.

    Have you really read the description of the bug in Metalink rather than just looking at the title of the bug? The bug itself is quite clear that a query plan that involves the elimination of the join is a necessary condition. The title of bug nothing will never tell the whole story.

    If you try to work through a few tens of thousands of bugs in 11.1.0.7, of which many are not published, trying to determine whether your application would be affected by the bug? Wouldn't be order of magnitude easier to upgrade the application to 11.1.0.7 in a test environment and test the application to see what, if anything, breaks? Understand that the vast majority of the problems that people experience during an upgrade are not the result of bugs - they are the result of changes in behaviour documented as changes in query plans. And among those who encounter bugs, a relatively large fraction of the new variety. Even if you have completed the Herculean task of verifying each bug on your code base, which would not significantly easier upgrade. In addition, at the time wherever you actually performed this analysis, Oracle reportedly released 3 or 4 new versions.

    And at this stage would be unwise to consider an upgrade to 11.2?

    Justin

  • Fill a table with date values with a fixed increment

    Hello

    I want to fill a table with a date column with the increment of a fixed value date values. The start date is selectable, the increment is selectable and the number of records is adjustable as well.
    For example
    start date is 1905-Jan-02, 15:00 (DD-MON-YYYY, HH24:MI:SS)
    increment is 1 hour and 5 minutes
    None. records is 10
    then the dates in the table must be
    REC 1 1905 - Jan - 02, 15:00
    REC 2 1905 - Jan - 02, 16:05
    REC 3 1905 - Jan - 02, 17:10
    ....
    REC 9 1905 - Jan - 02, 23:40
    REC 10 1905 - Jan - 03, 00:45:00

    We are working on 11 GR 2, the number of records can be between a few hundred and a few million and they must be ordered with Crescent of time (maybe to have a whole id).
    Any ideas how to fill this table (simple and fast?) using sql / plsql are welcome.

    Thanks, Hannes

    Something along the lines of:

    SQL> alter session set nls_date_format = 'YYYY-Mon-DD HH24:MI:SS';
    
    Session altered.
    
    SQL> select trunc(sysdate,'HH')+((rownum-1)*(1/24)*(65/60)) as dt
      2  from dual connect by rownum <= 20;
    
    DT
    --------------------
    2010-Aug-26 16:00:00
    2010-Aug-26 17:05:00
    2010-Aug-26 18:10:00
    2010-Aug-26 19:15:00
    2010-Aug-26 20:20:00
    2010-Aug-26 21:25:00
    2010-Aug-26 22:30:00
    2010-Aug-26 23:35:00
    2010-Aug-27 00:40:00
    2010-Aug-27 01:45:00
    2010-Aug-27 02:50:00
    2010-Aug-27 03:55:00
    2010-Aug-27 05:00:00
    2010-Aug-27 06:05:00
    2010-Aug-27 07:10:00
    2010-Aug-27 08:15:00
    2010-Aug-27 09:20:00
    2010-Aug-27 10:25:00
    2010-Aug-27 11:30:00
    2010-Aug-27 12:35:00
    
    20 rows selected.
    
  • Fill the table with the formula nodewith a line of code

    Hello

    This is my first post of the community, OR maybe this question has been asked 1000 times but I could find no answer.

    Before using LabView I used Matlab a lot. I find a bit that it's too complicated without reason sometimes in labview work with arrays.

    I inherited, and I'm doing a little cleaning. what it does is extractr 2 and 3 position and creates a new table with her and another oner with other elements of the first table. In my view, that he becomes confused because you should rely on the cell of the table, the position of the output and I didn't wat to work this way.

    I replaced it with a knot of formula. Here is the code

    The departure is FP, the table of 6 elements is mdot and the 2 elements array is press

    MDOT float64 [6], press [2];

    MDOT [0] = FP [0]; MDOT [1] = FP [1];
    MDOT [2] = FP [4]; MDOT [3] = PS [5];
    MDOT [4] = PS [6]; MDOT [5] = FP [7];

    Press [0] = PS [2], press [1] = PS [3];

    Now, I want to know if it is possible to do as I would in matlab or C, where you can create a table with one line of code. What would the syntax in formula node to do something like:

    MDOT [6] = [FP [0], FP [1], [4] of FP, FP [5], FP [6], FP [7]];

    Press [2] = [FP [2], FP [3]];

    Thank you

    Use remove the table.  You can provide an index and length of elements to remove.  One of the outputs will be the original with the subset of the deleted table and the other output is the subset deleted.  1 NŒUD!

    EDIT: Created a snippet just after my previous post.

  • Fill an empty table with predefined values

    Hi I have a page that uses ExecuteWithParams. I load a table on this page with pre defined values. The user access the page and changes value according to the needs and calls commit.

    My problem is that I can't figure out how to load the table with the page? I am not advocating the code as I have already written. I have no idea where to call the code of.
    Thank you

    Aj05,

    The best practice for this would be to use method call activities in the workflow as suggested change.

    Suggestion of Vinod was the only way to do it in 10g, but I wouldn't recommend it to 11g, as the implementation of the action is hidden in the definition of the page and you must understand the State of refresh and refresh and to ensure that the action does not more often than you. Task flow approach shows explicitly when the method is called

    John

  • Fill a table with two columns using a custom bean

    Hello

    Can you provide me or give me a link to an example of populating a table (with two columns) with a custom bean?

    Thank you

    TSPS

    Hello..
    I'm Jules Destrooper is what you want

    http://download.Oracle.com/docs/CD/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

    Hopes, will help you

  • Fill the table with random values

    Another thing I've come across is this:
    the table name is LOR, who has 3 fields NUMBER, DATA, TEXT with number, date and varchar2 data type.
    On a page, I have a text field where if I write 3, then it would add 3 lines to the table with predefined values ("number, something like 2222, for 12 January 09, and for text, something like" Lorem ipsum dolor sit amet, 195kgs adipisicing elit"). So basically, with the number that I give, it populates the table with lines... How can I do this? Thanks for helping me
    INSERT INTO LOR
    SELECT 222
    , sysdate
    , 'you string'
    FROM dual
    CONNECT BY level <= :Pxx_
    
  • compare two table with cluster inside

    Hello

    I want to compare two tables containing a cluster with several groups in it. When you use the equal the result is the same pattern as the cluster of entry. But I just need a true or false. It doesn't bother me that it changed on position 1 or any other position.

    Is there an elegant way to do it?

    Thanks for any help.

    Yves

    Right-click equality and change to compare aggregations. That, or add a table and later.

    /Y

  • Even table with values of different data controls

    JDev ADF BC Web services 11.1.1.5.0

    I have an array element in the user interface and two controls of data with the same set of attributes.
    One is a data based VO control and another is a data bean control in which attributes will fill a web service.

    I display a tabled text entry, a search button, and a table to the page.
    Now, if I get the value of parameter of the Webservice, the table automatically displays table of results of the Web service data control.
    And if not, the table must be empty and then it should belong the VO control data base.

    User af:switch for this component. A side holds the web service table and the other the vo we. The condition for the switch is the result of the web service call.

    Timo

  • Insert the problem using a SELECT table with an index by TRUNC function

    I came across this problem when you try to insert a select query, select returns the correct results, but when you try to insert the results into a table, the results are different. I found a work around by forcing a selection order, but surely this is a bug in Oracle as how the value of select statements may differ from the insert?

    Platform: Windows Server 2008 R2
    11.2.3 Oracle Enterprise Edition
    (I've not tried to reproduce this on other versions)

    Here are the scripts to create the two tables and the data source:
    CREATE TABLE source_data
    (
      ID                 NUMBER(2),
      COUNT_DATE       DATE
    );
    
    CREATE INDEX IN_SOURCE_DATA ON SOURCE_DATA (TRUNC(count_date, 'MM'));
    
    INSERT INTO source_data VALUES (1, TO_DATE('20120101', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120102', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120103', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120201', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120202', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120203', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120301', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120302', 'YYYYMMDD'));
    INSERT INTO source_data VALUES (1, TO_DATE('20120303', 'YYYYMMDD'));
    
    CREATE TABLE result_data
    (
      ID                 NUMBER(2),
      COUNT_DATE       DATE
    );
    Now, execute the select statement:
    SELECT id, TRUNC(count_date, 'MM')
    FROM source_data
    GROUP BY id, TRUNC(count_date, 'MM')
    You should get the following:
    1     2012/02/01
    1     2012/03/01
    1     2012/01/01
    Now insert in the table of results:
    INSERT INTO result_data
    SELECT id, TRUNC(count_date, 'MM')
    FROM source_data
    GROUP BY id, TRUNC(count_date, 'MM');
    Select the table, and you get:
    1     2012/03/01
    1     2012/03/01
    1     2012/03/01
    The most recent month is repeated for each line.

    Truncate your table and insert the following statement and results should now be correct:
    INSERT INTO result_data
    SELECT id, TRUNC(count_date, 'MM')
    FROM source_data
    GROUP BY id, TRUNC(count_date, 'MM')
    ORDER BY 1, 2;
    If someone has encountered this problem before, could you please let me know, I don't see what I make a mistake because the selection results are correct, they should not be different from what is being inserted.

    Published by: user11285442 on May 13, 2013 05:16

    Published by: user11285442 on May 13, 2013 06:15

    Most likely a bug in 11.2.0.3. I can reproduce on Red Hat Linux and AIX.

    You can perform a search on MOS to see if this is a known bug (very likely), if not then you have a pretty simple test box to open a SR with.

    John

  • Problem with logic groups combining data at the point of importation

    I really hope that you will be able to help me with a problem I've had for the last few days.

    The scenario I have requires a logical group be created as the source data must be mapped differently if its + ve or - ve even thought the source account is the same.

    I created a logical group complex and added the corresponding logical group account in the account mapping table. The group uses the definition of rule 001806 *.

    The accounts that would be affected by this rule are below the values:
    18060000 - 2093096.69
    18060000 2093096.69
    18060005 - 2474955.48
    18060005 2474955.48
    18060015 11319512.13
    18060015-8000000 (a PEAK partner)
    18060015 - 3319512.13 (a PEAK partner)

    The + ve values need to go to an asset account and the values of ve - to a liability account.

    At the stage of import, I have a zero value which seem to be the sum of the values of the first 4, substantive values 3 then appear on individual lines.

    Step validate the asset HFM account displays the 3 + values of ve (15.8 M) Although 2 of them apparently wide net to zero with the values of the first and the third - ve. However, the liability account shows the background raising 2 (11. 3 m) as its missing the other 2 values - ve. Assets and liabilities HFM values should be the same

    In the account mapping, I'm using the following script for the + ve (its been reformatted for this forum):
    ' If varValues (9) > '0' Result = "BSA401000" Else Result = "Ignore" End If

    The script - ve is:
    ' If varValues (9) < "0" Result = "BSL625600" Else Result = "Ignore" End If

    I later changed the logical group to be Simple, but I get a similar result, although what I am trying to reach seems to be detailed in the Administrator's Guide FDM under the heading create accounts within Simple logic groups

    I understand that it is a little lengthy so apologies if you need more information, then please let me know and I will happy to provide more

    Thank you, James

    You could even put in place two mapping rules and avoid the complexity of a logic rule, if you wish. The mapping will continue to the next line if it does not meet the criterion, and there is no result.

    Side assets would be with a name of rule vAsset (you can change this, but it must be unique to the next line)
    If varValues (9) > 0 then result = "BSA401000."

    and then you add a second line to your card with a name of vLiab rule and check the sign flip.

    If varValues (9)< 0="" then="" result="BSL6256002">

    In the past I have avoided the rules of logic to the extent possible, by adding removes the ability to drill holes in the source file.

    Concerning
    JOINT TASK FORCE

Maybe you are looking for

  • A general question to the community

    I have a general question to the forum community. I noticed that many contributors have more than 100,000 points. I'm a contributor forum for several years, I consider myself to be a casual user and offer contributions to daily or occasionally and th

  • Mouse pointer disappears on the second monitor

    I have a laptop HP Pavilion TX2000, Vista Home Premium 64-bit, running with an Acer 17 inch flat screen as a second monitor. After the awakening of fashion 'sleep' mouse cursor is no longer visible on the secondary monitor. The cursor is really activ

  • Wireless password issues (ahhhhhhhhh - please help)

    I have a router Wireless G Linksys (WRT54GS). For some reason any (even if I set the admin passowrd and I have a password on my system it always disappears. I notice that it is open to all and there is no change... I don't know why this is happening.

  • The registry editor

    Whenever I boot Windows 7, the Registry Editor opens and asks if I want to modify the registry. It seems is no big deal if I say yes or no. Is this standard procedure for Windows 7?

  • Charging of the battery/blackBerry Smartphones Blackberry problems

    ... My Blackberry has problems. One night I plugged it to load (I always charge it all night, I think it's about 10% charge left). The next morning, I discovered that although I had plugged everything, it didn't load. So he then stop and not restart.