Retrieve the month following the date

Hi people,

How can I get the part of months to a date.

Say, like, I want to get the month part (April = 4) 01/04/2009.

Thanks in advance!

Hello

You can get all parts of a DATE using TO_CHAR.
For example, on April 1, 2009

SELECT  TO_CHAR (SYSDATE, 'Month')
FROM    dual;

product of the results of this

April

(if you use English) and

SELECT  TO_CHAR (SYSDATE, 'MM')
FROM    dual;

produces this output (VARCHAR2)

04

Tags: Database

Similar Questions

  • How to join two tables to retrieve the data from the columns in table two. Tables have primary and foreign key relationships

    Hello

    I want to join the two tables to retrieve the data from the columns of the two table passing parameters to the join query. Tables have primary and foreign key relationships

    Details of the table

    Alert-1 - AlertCode (FK), AlerID (PK)

    2 AlertCode-AlertDefinition-(PK)

    Help, please


    ----------

    Hi Vincent,.

    I think that you have not worked on adf 12.1.3.  In adf 12.1.3 you don't have to explicitly create the association. When you create the EO to your table, Association xxxxFkAssoc, will be created by ADF12.1.3 for you automatically. Please try this and do not answer anything... You can also follow the links below. I solved the problem by using the following link

    Oracle ADF Guide step by step - Oracle ADF tutorial: creating a relationship of the master / detail using Oracle ADF

    ---

  • Cannot retrieve the data by binary storage by default for XML 11 g

    Oracle 11.2

    All,

    As someone mentioned in another post, I got I should use binary XMLType CLOB rather than 11g because it is more efficient. When I create the XMLType column as binary I can't retrieve the value of the column, but when I use CLOB I am able to extract data on.

    -Create table with XMLTYPE column.  Since it is 11.2 storage of the column is automatically binary
    CREATE THE TABLE HR. XMLTABLESTORE (key_id VARCHAR2 (10) PRIMARY KEY, xmlloaddate date, xml_column XMLTYPE);

    -Insert the XML into the XML column
    INSERT INTO HUMAN RESOURCES. VALUES XMLTABLESTORE (HR. XMLSEQUENCE. NEXTVAL, SYSDATE, XMLType (bfilename ('XMLDIRX', 'PROD_20110725_211550427_220b.xml'),
    nls_charset_id ('AL32UTF8'))); COMMIT;

    -When I do a select I see full XML in the xml_column column
    SELECT * FROM HR. XMLTABLESTORE

    -When I run the following query I get the following:
    SELECT extract (xml_column, ' / / MapItem/@ProductNum') ProductNum OF HR. XMLTABLESTORE

    ProductNum
    -------------
    XMLType

    -When I run the following query on the @, I get the following:
    SELECT extract (xml_column, ' / / MapItem/ProductNum ') ProductNum OF HR. XMLTABLESTORE

    ProductNum
    -------------
    Null value

    When I run the same SELECT query retrieves (xml_column, ' / / MapItem/@ProductNum') ProductNum OF HR. XMLTABLESTORE and the table is created by CLOB, I get out the expected value of the XML file.

    How can I get the query to retrieve the data through a binary file?

    I appreciate any help in advance.

    Thank you
    Shawn

    Published by: 886184 on Sep 20, 2011 15:42

    Probably a problem with your client tool.

    It works for me:

    SQL*Plus: Release 11.2.0.2.0 Beta on Mer. Sept. 21 19:39:55 2011
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Beta
    
    SQL> CREATE TABLE xmltablestore (
      2    key_id VARCHAR2(10) PRIMARY KEY
      3  , xmlloaddate DATE
      4  , xml_column XMLTYPE
      5  );
    
    Table created.
    
    SQL> INSERT INTO xmltablestore
      2  VALUES ('1', sysdate, XMLType(bfilename('TEST_DIR', 'PROD_20110725_211550427_220b.xml'),nls_charset_id('AL32UTF8')))
      3  ;
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> SELECT extract(xml_column, '//MapItem/@ProductNum') ProductNum
      2  FROM xmltablestore
      3  ;
    
    PRODUCTNUM
    --------------------------------------------------------------------------------
    63481062975
    
    SQL> SELECT extractValue(xml_column, '//MapItem/@ProductNum') ProductNum
      2  FROM xmltablestore
      3  ;
    
    PRODUCTNUM
    --------------------------------------------------------------------------------
    63481062975
    
    SQL> SELECT xmlcast(
      2          xmlquery('/Entries/Category/MapItem/@ProductNum'
      3           passing t.xml_column
      4           returning content
      5          )
      6          as number
      7         ) ProductNum
      8  FROM xmltablestore t
      9  ;
    
    PRODUCTNUM
    ----------
    6,3481E+10
    
    SQL> SELECT xmlcast(
      2          xmlquery('/Entries/Category/MapItem/@ProductNum'
      3           passing t.xml_column
      4           returning content
      5          )
      6          as varchar2(30)
      7         ) ProductNum
      8  FROM xmltablestore t
      9  ;
    
    PRODUCTNUM
    ------------------------------
    63481062975
    

    BTW, extract and extractvalue functions are deprecated in version 11.2.
    Oracle now recommends using XMLCast/XMLQuery.

  • BlackBerry Z3, I lost all my data on my SD storage card, please help me to retrieve the data.

    Dear Sir.

    I lost all my data on my SD storage card, please help me to retrieve the data. I have a Z3, just bought only a week before, I removed the card with the phone off and then give the card again and noticed that I lost all the data. Please help

    Try restarting your phone. Sometimes it shows data that brought them "disappeared". To do this, hold down your power button for about 15 seconds, until you see BlackBerry on your screen. Do not release the button until you see that without taking account of any other thing you see before that.

    Try this and post back with your results.

  • Need to retrieve the data for the current date.

    Hello

    I have a table which then retrieves information when using this command.

    Select ta_acct, shift, created_on track_alerts;

    Technicolor A 24 March 14

    Technicolor A 24 March 14

    Technicolor A 24 March 14

    Technicolor A 24 March 14

    Manitoba telecom a 24 March 14 system

    Technicolor A 24 March 14

    I used this statement to retrieve the data for the given date.

    Select ta_acct, shift, created_on track_alerts where created_on = 24 March 14 ';

    Its not data recovery.

    Need help.

    Kind regards

    Prasad K T,.

    984002170

    Prasad K T wrote:

    Yes the created data type is date.

    CREATED_ON DATE

    Partha thanks it works now.

    Select ta_acct, shift, created_on in track_alerts where to move is: Shift and TRUNC (created_on) = TO_DATE('24-MAR-2014','DD-MON-YYYY');

    Still, I made a small change to my querry.

    Select ta_acct, shift, created_on track_alerts where to move is: shft and TRUNC (created_on) = TO_DATE (select double sysdate,'MON-DD-YYYY "");

    For this statement, it does not work.

    of course not...

    first: sysdate returns a date so no need of conversion here

    and

    second SYSDATE includes time, so your application should look like this:

    Select ta_acct, shift, created_on in track_alerts where to move is: Shift and TRUNC (created_on) = trunc (sysdate)

    or

    Select ta_acct, shift, created_on in track_alerts where to move is: shft and created_on > = trunc (sysdate) and created_on<>

    HTH

  • ORA-01124: cannot retrieve the data file 1 - file is in use or recovery

    I'm trying to recover the database in waiting, but it gives the error below.

    ORA-00283: cool cancelled due to errors
    ORA-01124: cannot retrieve the data file 1 - file is in use or recovery, the recovery is already said
    ORA-01110: data file 1: ' I:\ORACLE\QAS\SAPDATA1\SYSTEM_1\SYSTEM. DATA1'

    When I checked in the alert log recovery is not started. and later I hae given ' alter database recover Cancel "and the command to meet with the threshold.

    "media recovery has not started.

    It seems that the recovery was stuck between the two.
    Please advise me how to kill the recovery session that is stuck. because I don't want to bounce the database pending.

    Thanks in advance.

    Dataguard and MRP, you run a script before.

    In a standby scripted, a session to RETRIEVE the DATABASE would an UNTIL clause (SEQUENCE up to THAT most likely). At the end of the recovery at this point (SEQUENCE #), he left and stop at the database.

    In addition, the script is such that when a RECOVERY session is active, another session is not authorized to start. It can loop in pending state or go out and do it again the next scheduled interval.

    Apparently your startup script is not strong enough to prevent another session of RECOVERY to start even though the first is active (or it doesn't have a good up to THAT clause and stop, exit, closing stocks)

    What you have is a custom implementation of a database of pending. Without all the details of the script, the 'blocking' between sessions (to avoid a second RECOVER start when one is already running) etc... We can't really do much to help you.
    Your scripts must be standing with status information. It should be possible for you to discover the 'other' sqlplus session which emanates a DATABASE to RECOVER, but not yet out (p. ex... How about a simple "ps - ef |") grep sql' and ' ps - ef | combination of grep ora"?)

    Hemant K Collette

    Published by: Hemant K Collette on May 29, 2013 17:47

  • ADFDI-05577: could not retrieve the data table on the server.

    Dear all,

    My use case is, when I opened my excellent work book, I have this error message is out ' ADFDI-05577: could not retrieve the data table on the server line "and when I click on the button 'OK' of the error message I can recover all the data on the server. Please help me how to solve this error?


    Concerning
    KT

    Thanks much Sireesha Pinninti, John Stegeman, Arun.

    Yes, my problem is of subquery. I found a solution from this site.
    http://www.DBA-Oracle.com/t_ora_01427_single_row_subquery_returns_more_than_one_row.htm,
    http://srinisboulevard.blogspot.com/2010/04/ora-01427-single-row-subquery-returns.html
    http://StackOverflow.com/questions/3804850/erroneous-ora-01427-single-row-subquery-returns-more-than-one-row / / the answer is the last line

    Before change (error subquery)

    CheckingEO.BO,
    (SELECT ntr_no FROM test
    WHERE cs_no = CheckingEO.CS_NO) NTR_NO
    To archive the CheckingEO

    Edit it like this

    (SELECT ntr_no FROM test
    WHERE cs_no = CheckingEO.CS_NO and Rownum = 1) NTR_NO
    To archive the CheckingEO

    Concerning
    KT

    Published by: KT on 23 May 2012 15:35

    Published by: KT on 23 May 2012 15:48

  • HFM SmartView Bug? HsGetValue retrieves the data for non-existent entity node.

    Hi guys,.

    We are facing a problem of SmartView 11.1.2.5.520 in combination with HFM 11.1.2.4.103. I would like to know if you can reproduce it.

    Assume it's our hierarchy of entity:

    Parent1 (EUR)

    Child1 (USD)

    Child2

    Child3

    Parent2 (GBP)

    Child4

    Children5

    We want to extract the data via "HsGetValue" for in < currency Parent > Child1, so need to entity to return node information: "Parent1.Child1." Works very well.

    Strangely enough, that's good, that the Parent2.Child1 data retrieves, although node do not exist!

    If you try it with ad hoc, an error message appears saying "Member does not exist", which is correct.

    Can someone check the BUG? If so, I'll open a SR.

    Thanks in advance!

    Carmonte

    Thank you guys! You responses helped me to understand that he is not really a bug.

    • HsGetValue retrieves a nonexistent node of to data from first available parent in the hierarchy.
    • Top of to HsGetValue retrieves no data. What is good.

    Knowing that, I can live with that.

    Thank you!

    Carmonte

  • Unable to retrieve the data using self join

    I'm trying to find the time required to close a ticket. The ticket goes through different stages: NEW, INPROCESS, CLOSED, REOPENED. If the ticket is reopened so the next step would be INPROCESS and then CLOSED.

    The CC_TICKET_INFO table contains information on the last step of the ticket. Table CC_TICKET_HISTORY contains information on every step of the ticket.

    The challenge here is that if the ticket is reopened so it should be considered as 2 instances instead of 1.

    Trial of stages: NEW-INPROCESS-> CLOSE >

    Second instance of stages: REOPEND -> INPROCESS-> CLOSE.

    Following SQL is to generate the data:

    CREATE TABLE CC_TICKET_INFO

    (

    TICKET_ID VARCHAR2 (20 BYTE) NOT NULL

    TICKET_STATUS VARCHAR2 (60 BYTE)

    , created_date timestamp (6)

    , LAST_CHANGED timestamp (6)

    , ASSIGNED_TO VARCHAR2 (20)

    CONSTRAINT PK_CC_TICKET_INFO PRIMARY KEY

    (

    ticket_id

    )

    )

    CREATE TABLE CC_TICKET_HISTORY

    (

    TICKET_ID VARCHAR2 (20 BYTE) NOT NULL

    TICKET_STATUS VARCHAR2 (60 BYTE)

    , CREATED_DATE TIMESTAMP (6) NOT NULL

    ASSIGNED_TO VARCHAR2 (255 BYTE)

    CREATED_BY VARCHAR2 (60 BYTE)

    CONSTRAINT PK_CC_TICKET_HISTORY PRIMARY KEY

    (

    TICKET_ID

    CREATED_DATE

    )

    )

    insert into cc_ticket_history values ('D21207155', 'NEW', 6/28/2013-17:28:59 ', null, 'jsg - st');

    insert into cc_ticket_history values ('D21207155', 'INPROCESS', 6/28/2013-17:48:19 ', 'ah-eg","ah-eg");

    insert into cc_ticket_history values ('D21207155', 'CLOSED', 6/28/2013 18:54:23 ', 'ah-eg","ah-eg");

    insert into cc_ticket_history values ('D21207155', 'REOPENED', 7/2/2013 19:55:04 ', 'ah-eg","jsg - st");

    insert into cc_ticket_history values ('D21207155', 'INPROCESS', 7/2/2013 20:11:17 ', "sr - eg", "sr - eg");

    insert into cc_ticket_history values ('D21207155', 'CLOSED', 7/2/2013 23:06:16 ', "sr - eg", "sr - eg");

    insert into CC_TICKET_INFO values ('D21207155', 'CLOSED', 6/28/2013-17:28:59 ', ' 02/07/2013-23:06:16 ', "sr - eg");

    ______________________________________________________________________

    I want to find the time difference between 6/28/2013 18:54:23 'and 6/28/2013-17:28:59 ' (first instance)

    and between 23:06:16 7/2/2013 ' and 7/2/2013 19:55:04 "(second instance)

    Is the closest, I make the through this query:

    Select L.ticket_id, L.CREATED_DATE, R.CREATED_DATE as close_date, L.TICKET_STATUS, R.TICKET_STATUS cc_ticket_history cc_ticket_history join RIGHT L R on (L.rowid < R.rowid) where (L.TICKET_STATUS = 'NEW' R.TICKET_STATUS AND 'CLOSED' =) OR (L.TICKET_STATUS = 'REOPENED' AND R.TICKET_STATUS = 'CLOSED');

    Can it be done through SQL?

    Hello

    ORA - aff wrote:

    Etbin thanks for the reply. I think you're closer!

    The first 3 orders insert above form the first instance. The second 3 inserts statements form the second instance.

    Ideally, I'd like the output to something like this (values taken by top of insert statements):

    Ticket_ID STATUS CREATED_DATE CLOSED_DATE TIME_DIFFERENCE

    D21207155 CLOSED ON 28/06/2013 17:28:59 6/28/2013 18:54:23

    D21207155 CLOSED ON 07/02/2013 19:55:04 07/02/2013 23:06:16

    You can do this by using the analytical LAST_VALUE function:

    WITH got_opened_date AS

    (

    SELECT ticket_id, ticket_status, created_date

    LAST_VALUE (CASE

    WHEN ticket_status IN ('NEW', 'REOPENED')

    THEN created_date

    END

    IGNORES NULL VALUES

    ) OVER (PARTITION BY ticket_id

    ORDER BY created_date

    ) AS opened_date

    OF cc_ticket_history

    )

    SELECT ticket_id

    ticket_status AS status

    opened_date AS created_date

    created_date AS closed_date

    NULL AS time_difference

    OF got_opened_date

    WHERE ticket_status = 'CLOSED '.

    ORDER BY ticket_id

    closed_date

    ;

  • Query to retrieve the data in a sort of pivot format.

    Hello gurus of PL/SQL,.
    I need to extract the data in a format some tables using the join condition. When I extracted using simple join then it turn around individual records based on condition, but want it in a particular format only.

    When run the query-

    Select sf. JOIN_DT_KEY, sd. CLS, sd. CLS_STATUS, sf. CLS_QTY, sf. CLS_FEES,
    SF. TOTAL_AMT
    of stud_det_fact sf, sd, cd class_dim stud_tag_dim
    where sf.stud_dim_key = sd.stud_dim_key
    AND sf.alloc_cls_dim_key = d.alloc_cls_dim_key AND sd. CLS_STATUS IN
    ("BA", "BSC", "MA", "MBA", "SMC")
    AND af. JOIN_DT_KEY between 20120404 and 20120410 ORDER BY sd. CLS

    That the data is returned in the following format:

    JOIN_DT_KEY CC CLS_STATUS CLS_QTY CLS_FEES TOTAL_AMT
    1 20120404 BA 1050000 12 875 WORK
    2 20120404 BA 125 12 150000 CAPITAL
    3 20120404 BA 1050000 12 875 WORK
    4 20120404 BSC 4 10 4000 CAPITAL
    5 20120404 BSC 3 10 3000 CAPITAL
    6 20120404 MY 1050000 12 875 WORK
    7 20120404 MY 1000 12 1200000 WORK
    8 20120404 MBA 1200000 12 1000 ALGO
    9 20120404 MBA 1200000 12 1000 ALGO

    But I want to in the format after using query itself.

    JOIN_DT_KEY WORK of CLS (Qty) WORK (Amt) CAPITAL (Qty) CAPITAL (Amt) (Qty) ALGO ALGO (Amt) NATURAL (Qty) NATURAL (Amt) GrandTotal (Qty) GrandTotal (Amt)
    20120404 1750 2100000 125 150000 0 0 0 0 1875 2250000 BA
    0 0 7 7000 BSC 0 0 0
    0 7 7000
    MY 1875 2250000 0 0 0 0 0
    0 1875 2250000
    0 0 0 0 2000 2400000 MBA 0
    2400000 2000 0
    3625 total 4350000 132 157000 2000 2400000 0
    0 6907000 of 5757

    How to change the query to get the hinge of the sort of result, kindly help me. I appreciate all your help in advance.

    Thank you and I really apperciate your help.

    Note:-attached, this is the example of excel sheet.

    Published by: user555994 on April 26, 2012 03:43

    I suggest that to take advantage of the Oracle version you have.

    To start, I took your first message and created a few sample data. This is not your original tables, but it allows us to compare the results.

    drop table T;
    create table T(JOIN_DT_KEY, CLS, STATUS, QTY, FEES, AMT) as select
    TO_DATE('20120404', 'YYYYMMDD'), 'BA', 'WORKING', 875, 12, 1050000 from dual union all select
    TO_DATE('20120404', 'YYYYMMDD'), 'BA', 'CAPITAL', 125, 12, 150000 from DUAL union all select
    TO_DATE('20120404', 'YYYYMMDD'), 'BA', 'WORKING', 875, 12, 1050000 from dual union all select
    TO_DATE('20120404', 'YYYYMMDD'), 'BSC', 'CAPITAL', 4, 10, 4000 from DUAL union all select
    TO_DATE('20120404', 'YYYYMMDD'), 'BSC', 'CAPITAL', 3, 10, 3000 from dual union all select
    TO_DATE('20120404', 'YYYYMMDD'), 'MA', 'WORKING', 875, 12, 1050000 from DUAL union all select
    TO_DATE('20120404', 'YYYYMMDD'), 'MA', 'WORKING', 1000, 12, 1200000 from DUAL union all select
    TO_DATE('20120404', 'YYYYMMDD'), 'MBA', 'ALGO', 1000, 12, 1200000 from DUAL union all select
    TO_DATE('20120404', 'YYYYMMDD'), 'MBA', 'ALGO', 1000, 12, 1200000 from DUAL;
    

    To test the following against your data, is taken your SELECT in the right place or create a view and plug the display where I have the table "T".

    Now, here's how to get everything except the last line "Total":

    select *
    from (
      select JOIN_DT_KEY, CLS, STATUS, QTY, AMT from t
    )
    PIVOT(SUM(QTY) QTY, SUM(AMT) AMT
    for STATUS in('ALGO' as ALGO,'CAPITAL' as CAPITAL,'DMA' as DMA,'NATURAL' as natural,'WORKING' as WORKING));
    
    JOIN_DT_KEY        CLS ALGO_QTY ALGO_AMT CAPITAL_QTY CAPITAL_AMT DMA_QTY DMA_AMT NATURAL_QTY NATURAL_AMT WORKING_QTY WORKING_AMT
    ------------------ --- -------- -------- ----------- ----------- ------- ------- ----------- ----------- ----------- -----------
    2012/04/04 00:00   BSC                             7        7000
    2012/04/04 00:00   BA                            125      150000                                                1750     2100000
    2012/04/04 00:00   MBA     2000  2400000
    2012/04/04 00:00   MA                                                                                           1875     2250000
    

    To get the latest "Total" line, you need to do another GROUP after the pivot.

    select JOIN_DT_KEY, nvl(CLS, 'Total') cls,
    SUM(ALGO_QTY) ALGO_QTY,
    SUM(ALGO_AMT) ALGO_AMT,
    SUM(CAPITAL_QTY) CAPITAL_QTY,
    SUM(CAPITAL_AMT) CAPITAL_AMT,
    SUM(DMA_QTY) DMA_QTY,
    SUM(DMA_AMT) DMA_AMT,
    SUM(NATURAL_QTY) NATURAL_QTY,
    SUM(NATURAL_AMT) NATURAL_AMT,
    SUM(WORKING_QTY) WORKING_QTY,
    SUM(working_AMT) working_AMT
    from (
      select JOIN_DT_KEY, CLS, STATUS, QTY, AMT from t
    )
    PIVOT(SUM(QTY) QTY, SUM(AMT) AMT
    for STATUS in('ALGO' as ALGO,'CAPITAL' as CAPITAL,'DMA' as DMA,'NATURAL' as natural,'WORKING' as WORKING))
    group by grouping sets((join_dt_key, cls), join_dt_key);
    
    JOIN_DT_KEY        CLS   ALGO_QTY ALGO_AMT CAPITAL_QTY CAPITAL_AMT DMA_QTY DMA_AMT NATURAL_QTY NATURAL_AMT WORKING_QTY WORKING_AMT
    ------------------ ----- -------- -------- ----------- ----------- ------- ------- ----------- ----------- ----------- -----------
    2012/04/04 00:00   BA                              125      150000                                                1750     2100000
    2012/04/04 00:00   MA                                                                                             1875     2250000
    2012/04/04 00:00   BSC                               7        7000
    2012/04/04 00:00   MBA       2000  2400000
    2012/04/04 00:00   Total     2000  2400000         132      157000                                                3625     4350000
    

    Using "grouping sets", you group by join_dt_key and cls (which the PIVOT is already done, but you have to do it again) and then by join_dt_key to get the total line.

    Note: I suppose you want a total by date. If you want just a total general for all dates, then Group Rollup (join_dt_key, cls)).

    I hope it's accurate and useful.

  • Need of a query to retrieve the data

    Hello

    I have a table named person. It has two fields A_ID and B_ID. The table does not have a primary key
    The data in the table are the following

    A_ID B_ID_ _

    1 5
    1 10
    2 5
    2 10
    4 15
    5 20

    I need to select A_ID and B_ID data so that when you select a given allocation A_ID or B_ID is not for more choices

    For Eg: I select the first pair of 1 and 5. Then 1 and 5 is not in the selection of data from A_ID or B_ID

    The output of the query for the data in the table above should be

    Output

    A_ID B_ID_ _

    1 5
    2 10
    4 15

    Hope you understand the situation.
    Can someone help me to create a query for me

    Thanks in advance

    Published by: user599079 on August 12, 2009 21:40

    This done:

    Nope:

    SQL>  with t as (
     select 1 a_id, 5 b_id from dual union all
     select 1, 10 from dual union all
     select 2, 5 from dual union all
     select 2, 10 from dual union all
     select 4, 15 from dual union all
     select 5, 6 from dual union all
     select 6, 9 from dual
    ),
    union_data  as
    (
        select    a_id    as id
        ,    'A'    as col
        ,    row_number () over (order by a_id, b_id)    as r_num
        from   t
    union all
        select    b_id    as id
        ,    'B'    as col
        ,    row_number () over (order by a_id, b_id)    as r_num
        from    t
    )
    ,    grouped_data    as
    (
        select      id
        ,      min (col) keep (dense_rank first order by r_num)    as first_col
        ,      min (r_num)                                     as first_r_num
        ,      row_number () over ( partition by min (col) keep (dense_rank first order by r_num)
                                  order by        min (r_num)
                         )                    as out_num
        from      union_data
        group by  id
    )
    select      a.id    as a_id
    ,      b.id    as b_id
    from      grouped_data    a
    join      grouped_data    b    on    a.out_num    = b.out_num
    where      a.first_col    = 'A'
    and      b.first_col    = 'B'
    order by  a.out_num
    /
          A_ID       B_ID
    ---------- ----------
             1          5
             2         10
             4         15
    
    3 rows selected.
    

    I expect him back at the last row too much (like my request).
    In addition to change line 5 - 6 5-25 mess up completely:

          A_ID       B_ID
    ---------- ----------
             1          5
             2         10
             4         15
             6         25
    
  • Saved my iPad in full before selling. How and then retrieve the data (bookmarks, photos, etc.) from my computer?

    Hello

    I sold my iPad of the week. Before the restore to factory default, I made a backup (already backup place regularly to icloud anyway). I did manually a couple of times to make sure that the data has been saved.

    I have just connected on iCloud on my PC but it is empty. I can try to go in Mail, Notes etc but there is nothing there. Can someone tell me what I am doing wrong and how I can find the data backup?

    Thank you

    Your backup data are not visible on iCloud.com

    Where you want to restore data to? You did an archive of data which cannot be used on another device. It is not accessible in any other way.

  • Retrieve the data from the merged Partition

    Can I recover data from the partition that was merged with primary or C?

    Hi satpalsingh.chouhan,

    Is there any way to recover the data merged into the partition.

    There are many third-party programs that could help you in the task.

    You will need to use your favorite search engine to find such a third-party program that could help you in the task.

    Important: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • Retrieve the data from the old hard drive IDE

    I have an old netbook HP TC 4200. I want to retrieve data from it. So I would like to know the details of the envelope required for the hard drive.

    None of the speakers USB external hard drive on the following URL will work. The book loads are also listed.

    http://www.Newegg.com/product/ProductList.aspx?submit=Ene&N=100008040%20600006255%20600006268&IsNodeId=1&name=IDE

  • Error just trying to retrieve the data in queue

    Hi all

    I'm trying to retrieve data from a table by using the following query that is written in the hold file:
    set numformat 999,999,999,999,999,999,999.999
    set trimspool on
    set echo off
    set line 10000
    set pagesize 50000
    set head on
    set array 1
    
    spool C:\ACCOUNT.spl
    
    select ACCOUNT_NO, BALANCE from TABLE1 where ACCOUNT_NO in (
    
    where the number of account number is more than 11000
    
    )
    -------------------------------------
    After you run the hold file above the following ERROR is coming:

    ERROR on line 2836:
    ORA-01795: maximum number of expressions in a list is 1000
    ------------------------------------

    could you pls. Let us know the process how to extract these check-in bulk over 1000 using the hold file?

    Thank you in advance.

    Published by: HOME_TOWN on June 7, 2009 20:20

    Published by: Francis Sep 24, 2009 22:31

    Hello.

    Create a new table and load your account_numbers in this, your query will be:

    select ACCOUNT_NO, BALANCE from TABLE1 where ACCOUNT_NO in (
    SELECT account_number from your_new_table);
    

    There is no limit on records you have in your new table.

  • Cannot retrieve the data mappings of resources

    Hi all

    Try SRM 5.8 in my lab before production deployment, and I am running into a problem of configuration of resource maps. I was able to correctly associate sites, but after that I added a new pair of mapping resources, I get the message "Unable to retrieve data from mappings of resources" from the GUI.

    Check the SRM logs and don't see anything relevant... Hoping someone can give an overview on the place where to look to fix this problem. Thank you!

    I think that I figured it was apparently the DNS resolution. My VC Prod could not resolve the host name of the VC DR (although I used IP addresses for the SRM installation). Once I added the local hosts two VCs file name resolutions, I could see the resource mapping of lists.

    Leaving it here just in case some else will continue in this issue.

Maybe you are looking for