Extending the data all in recovery

Dear all,

I hope you can help on how to achieve this with the best performance... Here is the table that we have:

CATEGORY XVALUE, YVALUE

BANANA USA 10

BEANS            US 8

APPLE            USA 2

ORANGES UNITED STATES 15

BEANS, FRANCE 5

APPLE FRANCE 20

GREECE 1 BANANA

It is necessary to search the table above and below show the result that extends from the read (returned distinct maximum in "BOLD" above) category for the rest of the data to fill the gaps with zero dynamically:

CATEGORY XVALUE, YVALUE

BANANA USA 10

BEANS USA 8

APPLE USA 2

ORANGES USA 15

BANANA          FRANCE 0

BEANS            FRANCE 5

APPLE            FRANCE 20

ORANGES FRANCE 0

GREECE 1 BANANA

BEANS            GREECE 0

APPLE            GREECE 0

ORANGES GREECE 0

Thank you!!

Hello.

You can use

with tt (select CATEGORY 'BANANA', 'USA' XVALUE, YVALUE 10 of union double all the)

Select the CATEGORY 'GRAIN', 'FRANCE' XVALUE, YVALUE 5 double)

Select t2. CATEGORY t2. XVALUE, nvl (t1. YVALUE, 0) YVALUE

TT t1, (select distinct t1. CATEGORY t2. XVALUE

t1, t2 tt TT) t2

where t2. CATEGORY = t1. CATEGORY (+)

and t2. XVALUE = t1. XVALUE (+)

order by 1, 2

Tags: Database

Similar Questions

  • Extend the data via vSphere Client store - error ' call 'HostDatastoreSystem.QueryVmfsDatastoreExtendOptions' object 'ha-datastore System' on ESXi 'IP' failed '.

    Hi @all,

    I want to thank my datastore on my 5.1 esxi.

    When you extend the data store on the vSphere Client Console, I get the error message:

    German: Call von 'HostDatastoreSystem.QueryVmfsDatastoreExtendOptions' as Objekt "ha-datastoresystem" auf fehlgeschlagen ESXi 'IP' ist.

    English: Call 'HostDatastoreSystem.QueryVmfsDatastoreExtendOptions' to object "ha-store system data" in ESXi 'IP' failed

    Anyone an idea why I can't extend the data store? The new drive is correctly detected.

    Best regards

    Andreas Acker

    Hello

    This seems to be a local data store. ? This is where the ESXi host is installed. ?

    Thank you
    Avinash

  • hp has extended the date of return to the offer of the College?

    hp has extended the date of return to the offer of the College?

    You need to ask HP directly for more information about this.

    This is the support forum for the consumer and not a business unit of HP.

  • Extend the data store

    Hello

    We got the HP Blades using SAN storage, recently, we want to expand our storage of current data (644,69 GB) to 1 tera store, then we increase the volume for datastore1 (esx host) via the hp management system.

    We do not see the device it detects the size of the total capacity GB 928,96, but when we check the size of the store of data, is only 644.49, so we click on Add button and we cannot see any other device or what we can add to existing storage.

    Grateful if someone can tell us what to do...

    Untitled.png

    Given that the data store is located on the installation disc, you may need to push manually, as explained in the http://deinoscloud.wordpress.com/2010/05/03/how-to-increase-the-size-of-a-local-datastore-on-an-esxi4/

    André

  • Selection based on the date of no recovery no lines

    Hello

    Why this doesn't work (returns 0 records)

    < cfquery = name 'interrogate' Datasource = "#Application.Datasource #" >
    SELECT *.
    THE VOTING
    WHERE the arguments start_date > = #DateFormat (now (), "dd-mm-yyyy") # and end_date < = #DateFormat (now (), "dd-mm-yyyy") #.
    < / cfquery >

    There are two rows on the table. One with start_date 12/01/2006 and the date of 12/19/2006, the other with 12/20/2006 start_date and end_date of 31/12/2006. Any of these get selected, once the current DAT files are 31/12/2006.

    Thank you

    My lack of formal training is showing through... I jump into the deep end.

    I changed the statement for...

    WHERE the #DateFormat (now (), "dd-mm-yyyy") # BETWEEN start_date and end_date

    I read this as "where is today > = past date and today.<= future="" date".="" i="" want="" a="" date="" between="" the="" start="" and="" end.="" but="" that="" doesn't="" return="" any="">

    What shocks you on the date format? JMA is the Australian date format.

    I will start this topic.

    Thank you
    Tanya

  • Simple index (the display of the data (all columns) in an index of Toad)

    Hi all

    I am training on sql tuning and over the years I've seen ppl creating many clues, today I'm trying to learn the different types of index and just curious to see physical data in an index, but I'm not able to do a toad, I know if I have a few def index as :

    create index employees_employee_id on employees (employee_id)

    My clue would have two columns of information: first rowid and employee_ids in a sorted order right? <-if my understanding is not correct could any1 please correct me here.

    PS: The major problem is to see the physical in Toad index data, please help me with this.

    Thank you very much

    Rahul

    There is no SELECT query that could be written on the index. But a select on a TABLE can be a way such that Oracle only scans the index and give you the information

    Here is an example.

    SQL > create table t
    () 2
    3 no integer
    4  );

    Table created.

    SQL > create index t_idx on t (no);

    The index is created.

    SQL > insert into t
    2. Select level
    3 from dual connect by level<=>

    10 rows created.

    SQL > commit;

    Validation complete.

    SQL > alter table t modify is not null;

    Modified table.

    SQL > exec dbms_stats.gather_table_stats (user, 't', cascade-online true)

    PL/SQL procedure successfully completed.

    SQL > select rowid, not according to t;

    ROWID NO.
    ------------------ ----------
    AAFrZaABMAAAiKKAAA 1
    AAFrZaABMAAAiKKAAB 2
    AAFrZaABMAAAiKKAAC 3
    AAFrZaABMAAAiKKAAD 4
    AAFrZaABMAAAiKKAAE 5
    AAFrZaABMAAAiKKAAF 6
    AAFrZaABMAAAiKKAAG 7
    AAFrZaABMAAAiKKAAH 8
    AAFrZaABMAAAiKKAAI 9
    AAFrZaABMAAAiKKAAJ 10

    10 selected lines.

    SQL > select * from table (dbms_xplan.display_cursor);

    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------
    SQL_ID, 35mwb1b3fpfrh, number of children 0
    -------------------------------------
    Select the rowid, not of t

    Hash value of plan: 3354442786

    --------------------------------------------------------------------------
    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |
    --------------------------------------------------------------------------
    |   0 | SELECT STATEMENT |       |       |       |     1 (100) |          |
    |   1.  INDEX SCAN FULL | T_IDX |    10.    30.     1 (0) | 00:00:01 |
    --------------------------------------------------------------------------

    13 selected lines.

    Actually in this case, I questioned the INDEX

  • The data agroenvironnemenaux file recovery

    I had a disk failure, and while I was waiting for the new upcoming disc in my drive also failed mirrored. Is there a way to get my database of fingerprints, because I had many, many connections stored in it?

    Hello Jerry_789,

    He'll probably be advantagous to contact the manufacturer of the fingerprint reader on what they know the specifics on which data files are required.

    Best regards

    Matthew_Ha

  • Extend the data store on ESXI 5.0 servers

    I have (2) 5.0 to aid a ESXI servers an ISCSI SAN that I increased the storage capacity on.  I see that I can increase the ability to store data in the Client VMware;  But I was wondering how this is done when there are (2) ESXI servers share the same SAN?

    Can I increase the storage in one or do I have to do the same for both?

    I was wondering,

    Ken

    Hello

    After that lie on the same host, the second should rescan it's HBA and detect the new size. If it does not, trigger a manual rescan.

    Tim

  • How to extend the date of expiry of a user

    Oracle 11g 11.2.00

    Our first Oracle system was installed late last year...

    Some passwords are supposed to expire during this weekend and I wouldn't do it now.

    I confirmed that the users I want to change use the same profile: DEFAULT

    And for this profile, I have values:

    NAME OF THE RESOURCE: PASSWORD_LIFE_TIME
    RESOURCE: PASSWORD
    LIMIT OF 180

    Can I just update this line with a command to update?

    Update limit dba_profiles = 180 where profile = 'Default';

    Is it possible to do? Is it safe?

    Ed

    Just change it to what you know, then, and you should be good to go. The user in the example below has a profile with an expiration date of ten days.

    SQL> alter user tmp identified by tmp;
    
    User altered.
    
    SQL> select expiry_date from dba_users where username = 'TMP';
    
    EXPIRY_DATE
    -----------------------------
    09-MAY-2011 14:31:58
    
    SQL> alter user tmp identified by tmp;
    
    User altered.
    
    SQL> select expiry_date from dba_users where username = 'TMP';
    
    EXPIRY_DATE
    -----------------------------
    09-MAY-2011 14:32:14
    
    SQL>
    
  • How to extend my dates to use firefox systems ithink I've expired aug.23 2015 that do to extend the dates or can you do automatic I need help. t has

    I want to extend my subscription in firefox.it seems it expired on August 23, 2015 how can you help me I have 81 years old and cela my only diversion for a boring life. Please help me.

    What do you mean by membership of Firefox or systems?

    Firefox is a browser web and is 100% free to download and use to www.mozilla.org and it is not necessary to register for anything to use Firefox.

  • extend the set of data

    Hi all
    Please find the below example scenario where I have to extend the set of data.
    I working on oracle 10g and all by extending the data set, we should exclude weekends. The sample is only for 2 ID, but there may be more than one.
    Thanks for your help.
     
    
    ID                    ST_DT          END_DT          VAL 
    ====               ========         =======        ======== 
    1                  2/2/2011             2/4/2011       4 
    1                  2/4/2011             2/8/2011       5 
    1                  2/8/2011                            6 
    2                  1/28/2011           2/1/2011        2 
    2                  2/1/2011                            8 
    
    ID                    DT             VAL 
    ====                ========      =======        
    1                 2/2/2011           4 
    1                 2/3/2011           4 
    1                 2/4/2011           5 
    1                 2/7/2011           5 
    1                 2/8/2011           6 
    1                 2/9/2011           6 
    2                 1/28/2011          2 
    2                 1/31/2011          2 
    2                 2/1/2011           8 
    2                 2/2/2011           8 
    2                 2/3/2011           8 
    2                 2/4/2011           8 
    2                 2/7/2011           8 
    2                 2/8/2011           8 
    2                 2/9/2011           8 
    
    select 1 as id,to_date('02/02/2011','MM/DD/YYYY') as st_dt,to_date('02/04/2011','MM/DD/YYYY') as end_dt, 4 as val from dual 
    union all 
    select 1 as id,to_date('02/04/2011','MM/DD/YYYY') as st_dt,to_date('02/08/2011','MM/DD/YYYY') as end_dt, 5 as val from dual 
    union all 
    select 1 as id,to_date('02/08/2011','MM/DD/YYYY') as st_dt, null as end_dt, 6 as val from dual 
    union all 
    select 2 as id,to_date('01/28/2011','MM/DD/YYYY') as st_dt,to_date('02/01/2011','MM/DD/YYYY') as end_dt, 2 as val from dual 
    union all 
    select 2 as id,to_date('02/01/2011','MM/DD/YYYY') as st_dt,null as end_dt, 8 as val from dual; 

    Hello

    I guess, when end_dt is NULL, you want to use the current date as end_dt, and the results you have posted are the desired results if the query is executed on February 10, 2011.

    Here's one way:

    WITH     got_n_days     AS
    (
         SELECT     id, st_dt, end_dt, val
         ,     NVL ( end_dt
                  , TRUNC (SYSDATE)
                  ) - st_dt          AS n_days
         FROM     table_x
    --     WHERE     ...     -- If you need any filtering, put it here
    )
    ,     cntr          AS
    (
         SELECT     LEVEL  - 1     AS n
         FROM     (
                   SELECT  MAX (n_days)     AS max_n_days
                   FROM     got_n_days
              )
         CONNECT BY     LEVEL <= max_n_days - 1
    )
    SELECT       d.id
    ,       d.st_dt + c.n          AS dt
    ,       d.val
    FROM       got_n_days     d
    JOIN       cntr          c  ON     c.n     < d.n_days
    WHERE       TO_CHAR ( d.st_dt + c.n
                  , 'DY'
                , 'NLS_DATE_LANGUAGE=ENGLISH'     -- If necessary
                ) NOT IN ('SAT', 'SUN')
    ORDER BY  id
    ,            dt
    ;
    

    Basically, each line of your original table must be repeated n times, where n is the number of days between (included) st_dt and end_dt (not included). The first subquery calculates this number and the main query results by combining your data with a "counter table", NTRC, which contains a line for each value of n that you may need. This 'table' is generated in the second auxiliary request.
    The join produces a line for each day. The WHERE clause eliminates the Saturday and Sunday from these results.

    Thanks for posting the sample data in a useful form. That really helps.

    Published by: Frank Kulash, February 10, 2011 14:29

  • Technical question from the data store

    Hello everyone.

    I have a question that you can maybe answer:

    "Is it possible to have a WARNING message (check) before formatting a LUN (EMC)?"

    Let me explain:

    We currently have a datastore composed of 12 LUN (of 236 GB), and even if this isn't in the best practices of VMware, I made a mistake (und) when creating a new data store.

    Indeed, I used a logic unit number which was attached directly to a virtual machine (in Raw Device) pour set up my new data store.

    Would you have a solution that makes a data control (on the logic unit number) and which could see us the partition proposed pour extend the data store contains data!

    Thanks in advance for your answer!

    J. Gaspoz

    Hi Julien

    Nice to see you on communities

    The vCenter will list all LUNS that are not already in the "Add storage" wizzard data warehouses, and by definition, a RDM en of is not formatted VMFS, since the lun belongs to the VM and it met with filesystem clean so son.

    There is therefore no direct way to pour do what you're asking (UN ESX knows nothing about the data on a non-vmfs LUNs).

    Personally, plug-in a simple way: the LUN ID. All the LUNs that will be used in RDMS are presented to my ESX with UN LUN ID between 50 and 70 (f.ex.). So I know whether or not a lun is RDM.

    Otherwise maybe third-party products (rv maybe tools) can get out a report listing the VM using the RDM.

    I hope that helps!

    Best regards.

    Stéphane Grimbuhler

    Senior consultant virtualization & storage (VCP / VCAP-DCA)

    VMware instructor (VCI)

    My Blog: www.virtualgeek.ch

  • Essbase data backup and recovery

    Hello

    We have a process in place for the App backup folder... I saw a process where data recovery is made by just the files ind and pag... and the restructuring of the DB... it is a good practice for the data backup and recovery...

    Assuming that the pag and index files are in the same location that the db files then, stop the application, restore the files, start up, up to you if you want to restructure as if you have restored all the files, it will be in the same State when the backup was performed.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Stopping the process background Media Recovery, need to resolve the issue

    Hello

    Nice day!

    O/S: HP - UX 11.31
    DB: 10.2.0.5

    primary database: 2xnode RAC/ASM
    database Watch: Single Instance / Unix file system

    Problem
    ======
    due to not having enough file system free space on the database pending node the name extension (primary database insider) Undo tablespace data file failed on the eve of the database and stop MRP.

    primary 2xnode RAC/ASM works well, as there is sufficient free space available in ASM - DG, but on the eve of the database MRP could not operate as cancel datafile could not be postponed because of not enough free space on the file system.


    Alert - content:

    ORA-01237: impossible to extend datafile 7
    ORA-01110: data file 7: ' / oracle/folder/undotbs2_01.dbf'
    ORA-19502: write error on file ' / oracle/folder/undotbs2_01.dbf ', blockno 102713 (blocksize = 8192)
    ORA-27072: IO file error
    HP-UX-ia64 Error: 11: Resource temporarily unavailable
    Additional information: 4
    Additional information: 102713
    Additional information: 456704
    Sun Aug 07 11:27:58 PST 2011
    Some of the files recovered data maybe left media fuzzy
    Media recovery can continue but open resetlogs may fail
    Sun Aug 07 11:27:58 PST 2011
    Errors in the /xxxx/bsspindb_mrp0_11342.trc file:
    ORA-01237: impossible to extend datafile 7
    ORA-01110: data file 7: ' / oracle/folder/undotbs2_01.dbf'
    ORA-19502: write error on file ' / oracle/folder/undotbs2_01.dbf ', blockno 102713 (blocksize = 8192)
    ORA-27072: IO file error
    HP-UX-ia64 Error: 11: Resource temporarily unavailable
    Additional information: 4
    Additional information: 102713
    Additional information: 456704
    Sun Aug 07 11:27:58 PST 2011
    MRP0: Stopping the process background Media Recovery (bsspindb)


    contents of the trace file:
    =============

    2011-08-07 11:27:32.542
    2011-08-07 11:27:32.542 64896 kcrr.c

    MRP0: Background Media Recovery terminated with error 1237
    ORA-01237: impossible to extend datafile 7
    ORA-01110: data file 7: ' / oracle/folder/undotbs2_01.dbf'
    ORA-19502: write error on file ' / oracle/folder/undotbs2_01.dbf ', blockno 102713 (blocksize = 8192)
    ORA-27072: IO file error
    HP-UX-ia64 Error: 11: Resource temporarily unavailable
    Additional information: 4
    Additional information: 102713
    Additional information: 456704
    -Redo read statistics for thread - 2
    Read rate (SYNC): 2651607 KB in 18054.67 s = > 0.14 Mb / s
    Physical reads total: 2651607Kb
    Longer: 14 Ko moves: 0/9426662 (0%)
    Change the movements: 1382412/14790845 (9%), moved: 503 MB
    More long LWN: 1081 KB, moves: 204/935910 (0%), moved: 5 MB
    Redo last scn: 0x0807.6e5e2a25 (8828009458213)
    ----------------------------------------------
    2011-08-07 11:27:32.557
    Fall of Media Recovery redo thread 2
    -Redo read statistics for thread - 1
    Read rate (SYNC): 2696445 KB in 18836.08 s = > 0.14 Mb / s
    Physical reads total: 2696445Kb
    Longer: 64 k, moves: 0/7997789 (0%)
    Change the movements: 1622690/11754876 (13%), moved: 701Mb
    More long LWN: 1974 KB moves: 237/591888 (0%), moved: 22 MB
    Redo last scn: 0x0807.6e5e2a03 (8828009458179)
    ----------------------------------------------
    2011-08-07 11:27:32.557
    Fall of Media Recovery redo thread 1
    2011-08-07 11:27:58.586
    The recovery is currently fatal!
    2011-08-07 11:27:58.586 1170 krsm.c
    Managed recovery: no Active posted.
    ORA-01237: impossible to extend datafile 7
    ORA-01110: data file 7: ' / oracle/folder/undotbs2_01.dbf'
    ORA-19502: write error on file ' / oracle/folder/undotbs2_01.dbf ', blockno 102713 (blocksize = 8192)
    ORA-27072: IO file error
    HP-UX-ia64 Error: 11: Resource temporarily unavailable
    Additional information: 4
    Additional information: 102713
    Additional information: 456704
    2011-08-07 11:27:58.590 64896 kcrr.c
    MRP0: Stopping the process background Media Recovery
    2011-08-07 11:27:58.590 1170 krsm.c
    ++++++++++++++++++++++++++++++++++


    No idea how fix the problem and restart the MRP process.

    Thank you...

    Kind regards
    X

    Hello

    You must add the disk to the /oracle file system. It seems that there is not enough space to extend the data file.
    After the addition of disc, you can restart the recovery with:
    ALTER DATABASE RECOVER MANAGED STANDBY BASE DISCONNECT FROM THE SESSION.

    or

    You can move your data undotbs2_01.dbf file to another file system that has enough space, that
    ALTER system set standby_file_management = manual scope = mΘmoire;
    change the database file rename ' / oracle/folder/undotbs2_01.dbf' to ' / new_fs/undotbs2_01.dbf ';
    ALTER system set standby_file_management = auto scope is mΘmoire;.

    then start the recovery.

    concerning

  • Extended metadata date / time shift

    Up for it seems that Lightroom 3 can only enter a new date / time for the Meta data creation / change / change the values. Or it can change the weather not 1 hour to fix timezone problems whitin has set +/-range.

    Now imagine all that I have image files from different cameras on the same event and the internal time of the device is not the same to any camera, medium, for example a camera time is 20 minutes late (-20 min) compared to another device. Of course, so I could enter a time for the moment of creation in lightroom directly. But I should do for 300 images?

    I need a function extended the date / time modified:

    It should be possible to make a change of the batch of pictures of +/-hh to adapt the images from a camera (which had a bad interal time setting) to real-time or at least an hour from another device (of course you need to know the difference in time between the hours of the camera).

    Such a function is properly provided by the software bit EXIFTool - but it isn't pleasant manage files outside of Lightroom image comes to alter time. And Lightroom already has a function for this - but its possibilities are not good enough.

    Please implement this as soon as possible.

    Best regards

    Jochen

    If you type "change the capture time" on the Help menu, you'll find this:

    If more than one photo is selected in the grid, Lightroom changes the capture time for the active photo of the specified adjustment. (The active photo is presented as a preview in the Edit Capture time dialog box.) Other photos of the selection are adjusted by the same amount of time. If more than one photo is selected in the Filmstrip in Loupe mode, comparison, or investigation, the capture time is changed only on the active photo.

    This should answer your question.

Maybe you are looking for

  • How can I add AddressBook files

    After a few updates ago, I was not able to add new folders, not lists, folders. I can't find the options that would allow this

  • The boxes "trace the legend" a link to Boolean values

    Hi all I save data to data acquisition of a waveform graph (where channels are displayed as plots of different color on the same chart) and I want the plots "unchecked" in the legend to go unregistered. Ideally there would be a sort of Boolean value

  • 15 G-212NL HP: HP 15G 212 BROKEN HINGE LAPTOP NL

    HI, the left hinge of the laptop of my girlfriend broke: it started with a gap between the bezel and the screen that does not have a link initially to the hinge. So I decided to remove the bezel of the screen to look underneath and I realized that th

  • Unlimited video with unlocked bootloader

    Hello hereFirst of all, I'm sorry for my bad English. I encountered a problem with the software 'unlimited video' after unlocking my bootloader.It seems to be affected by the drm keys.Before I unlock my bootloader, it worked. I downloaded playstore w

  • Very strange Vista problem when behind a switch

    I bought the router WRT610N along a LINKSYS EG008W 10/100/1000Mbps Gigabit Workgroup Switch. In my small office (4 closed offices and an area central + kitchen + room + storage + a bowl of chocolate for my pregnant wife), we were using our ISP (Bell)