Query to find the name of the partition

Hi all

I'm a little surprised to see that it is not a column I can use to query the name of the partition for a table, in the case of partition of Internval per day...

I'm looking for a simple query find the name of the partition for the word partition of today ' today... Am I missing something?

Ask something like...

Select nom_partition from dba_Tab_partitions where table_name = 'XYZ' and TO_DATE(HIGH_VALUE,'DD-MON-YYYY') = April 2, 2014"

High value being a long column, lets you convert CHAR or DATE?

Thanks in advance

Then, you create a copy of dba_tab_partitions, since you can only convert the LONG data during an insertion type or create the table.

From Dan article: «just...» If you have a LONG, and you want to appear more than it, you must use TO_LOB to convert it during either an INSERT INTO

or a CREATE TABLE As . Everything else is just wasting time. "

Tags: Database

Similar Questions

  • What is the query to find the name of all applications for all EBS R12.1.3 modules?

    What is the query to find the name of all applications for all EBS R12.1.3 modules?

    With regard to:

    Mr. Shahzad Saleem

    Try:

    SELECT * FROM fnd_concurrent_programs_vl;

  • SQL query to find the total number of source based nonsource passangersbetween source and destination station and passenger station on the same chekindate

    Hello

    SQL query to find the total number of source based nonsource passangersbetween source and destination station and passenger station on the same chekindate.

    Please help on this script and let me know if you need more details.

    ---

    You use a SELECT statement.  Let me know if you need more details.

  • Query to find the Pages and the list of permissions associated with a particular role in PS

    I want a query to find the Pages and the list of permissions associated with specific roles in PS.

    For example, if we see the role of manager accounts payable, it conatins Pages and the list of permissions.

    But, to get everything in EXCEL sheet by Manuel priocess's BIG job. So, can someone give me the query.

    Please try under queries

    The roles assigned to the list of Perm:

    SELECT B.ROLENAME

    OF PSCLASSDEFN A, PSROLECLASS B

    WHERE (A.CLASSID = B.CLASSID

    AND A.CLASSID =: 1).

    List of Perm pages can access:

    SELECT B.MENUNAME, B.BARNAME, B.BARITEMNAME, B.PNLITEMNAME, C.PAGEACCESSDESCR, B.DISPLAYONLY

    OF PSCLASSDEFN A, PSAUTHITEM B, PSPGEACCESSDESC C

    WHERE (A.CLASSID = B.CLASSID

    AND A.CLASSID =: 1

    AND B.BARITEMNAME > ' '

    AND B.AUTHORIZEDACTIONS = C.AUTHORIZEDACTIONS)

  • query to find the dependent task, attached to the task on a response in OIM 11 g

    can someone help me to do a sql query to find the dependent task, attached to the task on a response in OIM 11 g

    Published by: user13331347 on Sep 3, 2012 14:09

    Use under query to find the dependent task in OIM 11 g: -.

    Select pkg.pkg_name, mil.mil_name, rsc.rsc_data, rsc.sta_key, sta.sta_status, sta.sta_bucket, mil2.mil_name
    pkg pkg, tos tos, mil mil, mil mil2, rsc rsc, sta sta, rgm the rgm
    where pkg.pkg_key = tos.pkg_key
    and tos.tos_key = mil.tos_key
    and mil.mil_key = rsc.mil_key
    and rsc.sta_key = sta.sta_key
    and rgm.rsc_key = rsc.rsc_key
    and rgm.mil_key = mil2.mil_key
    order of pkg.pkg_name, mil.mil_name, rsc.rsc_data, sta.sta_status, mil2.mil_name

  • Query to find the coordinates of employee salary

    Hello

    Could someone help write the query to find the salary of the employee details.

    Thanks in advance.

    This should help you get started:

    SELECT papf.full_name
    papf.email_address
    ppp.proposed_salary_n salary
    OF per_pay_proposals ppp
    per_all_assignments_f ADP
    per_all_people_f women's wear
    WHERE ppp.assignment_id = paaf.assignment_id
    AND paaf.assignment_type = 'E '.
    AND paaf.primary_flag = 'Y '.
    AND paaf.person_id = papf.person_id
    AND nvl (papf.current_employee_flag, 'n') = 'Y '.
    AND trunc (sysdate) BETWEEN
    PPP.change_date AND ppp.date_to
    AND trunc (sysdate) BETWEEN
    PAAF.effective_start_date AND paaf.effective_end_date
    AND trunc (sysdate) BETWEEN
    PAPF.effective_start_date AND papf.effective_end_date;

  • Query to find the group name for the Business of the employee

    Hello

    I'm new to the HRMS module.

    I want to find employee (per_all_people_f) information about commercial groups.

    I found a HR_ALL_ORGANIZATION_UNITS database table, but there are many records in this table with the same business_group_id that in itself is not a unique key.

    Could someone help me find the link between employees and their BG.

    Thank you.

    Hello

    The link is between per_all_people_f.business_group_id and hr_all_organization_units.organization_id (i.e., the pharmacokinetics of the table). It will be useful.

    Kind regards.

  • Cannot find the partition recovery on the Satellite A200-1BP

    Hello

    First of all, I have a Vista Home Premium 1BP A200 and I lost the product recovery disc and I want to create one with "Recdisc.exe" product of Toshiba Recovery Disc Creator or Vista.

    They both failed because I didn't get a message "No disk HARD recovery Area!", then I looked in the "Disk management" section and could not find any partition without a name.

    There were two primary Partition which were 1.46 GB 'in good condition (EISA Configuration)"and my Vista (c).
    So, what should I do? Can I create a recovery partition?
    Or can I set the Recovery Disc Creator? (v. 5.0.0.5)

    PS: I got my computer several times with my CD, which probably used my recovery partition.
    Seriously, I'm out of ideas and I don't want to lose 50 dollars just to get another copy of disc PR.

    PS2: I used press '0' and 'F8' thing too, they no longer work.
    Is there a way I can restore without any disk?

    Post edited by: darthbabam12

    > There are two primary Partition which were 1.46 GB 'in good condition (EISA Configuration)"and my Vista (c).
    > So what do I do? Can I create a recovery partition?
    > Where can I solve the Recovery Disc Creator? (v. 5.0.0.5)

    It seems that the recovery of HARD drive partition is missing
    The first 1.46 GB partition is automatically created by Vista and the C partition is the system partition, the partition of HARD drive recovery doesn't seem to be available

    > PS: I got my computer several times with my CD, which probably used my recovery partition.
    Retrieve you the Vista using the recovery disc or what drive did you use?

    If you have installed the system using Microsoft Vista disk then, it was a big mistake because it deleted the partition of HARD drive

    > Is there a way I can restore without any disk?
    Either you use a Vista MS disk and missing drivers, which you can download from the Toshiba page or you order the Toshiba Recovery disk don't see another solution

  • Query based on the partition of the date

    Hello

    I'm trying out only a professional successful integration in the last 24 hours of the day. If there is work that has the outcome of success and failure in the last
    24 hours for each day, I only managed the output. If there is no success for the same work, I pulled out as the last attempt at failed job.

    Here are my columns:
    current output:
     
    JOB_ID     JOBDATE               GROUP     PATH          OUTCOME          FAILED     LEVEL     ASSET
    3400908     7/27/2012 10:01:18 AM     polA     target1          Success          0     incr     clone1
    3400907     7/27/2012 10:01:09 AM     polA     target1          Failed          0     incr     clone1
    3389180     7/23/2012 10:01:14 AM     polA     target1          Failed          1     incr     clone1
    3374713     7/23/2012 10:01:03 AM     polA     target1          Success          0     incr     clone1
    3374712     7/22/2012 11:24:32 AM     polA     target1          Success          0     Full     clone1
    3367074     7/22/2012 11:24:00 AM     polA     target1          Failed          1     Full     clone1
    3167074     7/21/2012 10:01:13 AM     polA     target1          Success          0     incr     clone1
    336074     7/21/2012 10:01:08 AM     polA     target1          Success          0     incr     clone1
     
    desired output:
     
    JOB_ID     JOBDATE               GROUP     PATH          OUTCOME          FAILED     LEVEL     ASSET
    3400908     7/27/2012 10:01:18 AM     polA     target1          Success          0     incr     clone1
    3374713     7/23/2012 10:01:03 AM     polA     target1          Success          0     incr     clone1
    3374712     7/22/2012 11:24:32 AM     polA     target1          Success          0     Full     clone1
    3167074     7/21/2012 10:01:13 AM     polA     target1          Success          0     incr     clone1
    
    Here is a code I am trying to use without success:
    
    
    select *
     from
       (selectjob_id, jobdate, group, path, outcome, Failed, level, asset,
              ROW_NUMBER() OVER(PARTITION BY group, path, asset ORDER BY jobdate desc) as rn 
                   from job_table where jobdate between trunc(jobdate) and trunc(jobdate) -1 )
       where rn = 1
       order by jobdate desc;
    Thank you
    -Abe

    Hi, Abe,

    You are on the right track, using ROW_NUMBER to assign numbers and pick-up only #1 in the main query. The main thing you're missing is the PARTITION BY clause.
    You want to assign a #1 for each distinct combination of group_id, path, assets and calendar day , right?
    Then, you need to PARTITION BY group_id, path, assets and calendar day . I think you understand that when you called this thread "query based * on partition date."

    The next thing is the controlling ORDER BY clause. To know which line of each partition is assigned #1, you must order the lines of result ("Success" first, then "Failed") and after that, of jobdate (jobdate last first, which is in descending order).

    If so, that's what you want:

    WITH     got_r_num     AS
    (
         SELECT  j.*     -- or list columns wanted
         ,     ROW_NUMBER () OVER ( PARTITION BY  group_id     -- GROUP is not a good column name
                                   ,                    path
                             ,             asset
                             ,             TRUNC (jobdate)
                                   ORDER BY          CASE  outcome
                                                 WHEN  'Succcess'
                                         THEN  1
                                         ELSE  2
                                             END
                             ,             jobdate     DESC
                           )      AS r_num
         FROM    job_table  j
         WHERE     outcome     IN ('Success', 'Failed')
    --     AND     ...     -- Any other filtering, if needed
    )
    SELECT     *       -- or list all columns except r_num
    FROM     got_r_num
    WHERE     r_num     = 1
    ;
    

    If you would care to post CREATE TABLE and INSERT instructions for the sample data, and then I could test it.

    It seems that you posted several copies of this thread.  I bet that it's not your fault; This site can cause that.  Even if it's not your fault, please mark all versions duplicated this thread as "Answered" immediately and continue in this thread if necessary.

    Published by: Frank Kulash, 28 July 2012 23:47
    This site is crumbly than I thought! I saw at least 3 copies of this same thread earlier, but I'm not now.

  • Query to find the setting and add it to the minimum value

    Hi, I need a query to run under operation
    I have a table as shown below

    chg tax code Bill rec_no r_cost d_cost
    12345 1 114,35 100.30 1.00 1.00 234
    2 12345 114,35 2.00 1.00 1.00 201
    3 12345 114,35 14.00 1.00 1.00 600
    4 23412 120.90 110,40 1.00 1.05 700
    5 23412 120.90 12,50 1.00 1.05 900


    In this table, I need to find the setting for each rec_no as
    (r_cost + chg + taxes)-sum (d_cost) for rec_no = 12345
    (114.35 + 1.00 1.00)-(100.30+2.00+14.00) plus 0.05
    This 0.05 must be added to the minimum (code) for the rec_no 12345.
    If the d_cost of the code, with rec_no = 12345 201 should be (2.00 + 0.05 = 2.05).

    and,
    (120.90 + 1.00 1.05)-(110.40+12.50) plus 0.05
    This 0.05 must be added to the minimum (code) for the rec_no 23412.
    If the d_cost of the code, with rec_no = 23412 700 should be (110,40 + 0.05 = 110.45).

    Kindly help me in writing of an oracle application to perform the above operation.
     with tab as (
        select 1 invoice,12345 rec_no,114.35 r_cost,100.30 d_cost,1.00 chg,1.00 tax,234 code from dual union all
        select 2 invoice,12345 rec_no,114.35 r_cost,2.00 d_cost,1.00 chg,1.00 tax,201 code from dual union all
        select 3 invoice,12345 rec_no,114.35 r_cost,14.00 d_cost,1.00 chg,1.00 tax,600 code from dual union all
        select 4 invoice,23412 rec_no,120.90 r_cost,110.40 d_cost,1.00 chg,1.05 tax,700 code from dual union all
        select 5 invoice,23412 rec_no,120.90 r_cost,12.50 d_cost,1.00 chg,1.05 tax,900 code from dual
    )
     SELECT tab.*,
      CASE
        WHEN DENSE_RANK() OVER (partition BY rec_no ORDER BY code)=1
        THEN r_cost + chg +tax-SUM(d_cost) over (partition BY rec_no)+MIN(d_cost) keep (DENSE_RANK FIRST
       ORDER BY code) over (partition BY rec_no)
        ELSE d_cost
      END adj
       FROM tab
    ORDER BY invoice
    

    Find out what...

    Ravi Kumar

  • Query to find the previous activity in STM

    I have a data base to reflect a State of Transition (STM) Machine. It contains 3 tables: activity, node, and Transition.

    Tables of knots and Transition are the configuration of the STM. They define the different possible States and the possible transitions between States.

    The way that I take through the STM is recorded in the activity Table. A record is created for each visited node.

    I need a query that uses the id of my current activity to find my previous activity, i.e. the activity that precedes me directly. The following rules apply:
    -My Id is meaningless
    -It should work for different configurations of the transition and the node tables, but:
    -The starting node is always the node "A".
    -There is no recursive transition, for example ('B', 'B');
    -There is no circular transitions, for example ('B', 'C') and ('C', 'B')
    -Transition and node tables will never change between the creation of the first activity and the execution of the query.
    -The path reflected in the activity table is always a valid path.
    -My current activity is always the last activity.

    For all data below, find the previous activity of activity with id = 4. The correct answer is "C".
    DROP TABLE Transition;
    DROP TABLE Activity;
    DROP TABLE Node;
    
    CREATE TABLE Node
    (
         Id VARCHAR2(1) PRIMARY KEY
    );
    
    CREATE TABLE Activity
    (
         Id Number(8,0) PRIMARY KEY,
         Node_Id VARCHAR2(1)
    );
    
    CREATE TABLE Transition
    (
         FromNode_Id VARCHAR2(1),
         ToNode_Id VARCHAR2(1)
    );
    
    ALTER TABLE Activity
    ADD FOREIGN KEY
    (Node_Id) REFERENCES Node(Id);
    
    ALTER TABLE Transition
    ADD FOREIGN KEY
    (FromNode_Id) REFERENCES Node(Id);
    
    ALTER TABLE Transition
    ADD FOREIGN KEY
    (ToNode_Id) REFERENCES Node(Id);
    
    INSERT INTO Node VALUES ('A');
    INSERT INTO Node VALUES ('B');
    INSERT INTO Node VALUES ('C');
    INSERT INTO Node VALUES ('D');
    
    INSERT INTO Transition VALUES ('A','B');
    INSERT INTO Transition VALUES ('B','C');
    INSERT INTO Transition VALUES ('B','D');
    INSERT INTO Transition VALUES ('C','D');
    
    INSERT INTO Activity VALUES (1,'A');
    INSERT INTO Activity VALUES (2,'B');
    INSERT INTO Activity VALUES (3,'C');
    INSERT INTO Activity VALUES (4,'D');
    Desired output:
    ID
    -
    C

    Hello

    Assuming that all Activity_id tells us nothing on the way, but all lines of activity together to form a single path, we can get results this way:

    WITH     all_paths    AS
    (
         SELECT     'A' || SYS_CONNECT_BY_PATH (a.Node_id, '/')
                  || '/'     AS node_id_path
         FROM     Transition  t
         JOIN     Activity    a  ON  a.Node_Id  = t.ToNode_Id
         WHERE     LEVEL             = (
                                SELECT  COUNT (*)
                             FROM     activity
                             ) - 1
         START WITH  t.FromNode_Id  = 'A'
         CONNECT BY  t.FromNode_Id  = PRIOR t.ToNode_Id
    )
    SELECT       REGEXP_SUBSTR ( node_id_path
                     , '([^/]+)/' || (
                                        SELECT  Node_Id
                                 FROM    activity
                                 WHERE   Id     = 4  -- target_id
                                    )
                             || '/'
                   , 1
                   , 1
                   , NULL
                   , 1
                   )     AS prev_id
    FROM       all_paths
    ;
    

    This means, there is some character (I used "/" above) that we know never appears in Activity.Node_Id.

    Since there are no loops in Transition, it cannot be more than 1 way that involves all activity lines. If there are N lines in operation, this full path will be one that extends to LEVEL = N - 1. (It is not N, N - 1, because the join between the activity and the Transition will always leave 1 line in activity with Node_Id = 'A'). As soon as we have the full path (which is node_id_path in 1 row, produced by all_paths), we just need to guess what was the Node_Id, which corresponds to the id of the target (4 in this example) and find the previous of the delimited node_id_path node_id.

  • Query to find the sales order

    Hi all
    I need a query to find sales order number against which a serial number is processed.

    Can ny helps an onthis.

    Thank you

    Hello
    Try the following question

    Select wdd.source_document_number
    Of wsn wsh_serial_NUMBERS,.
    wsh_delivery_details JMD
    Where wsn.delivery_detail_id = wdd.delivery_detail_id
    And & wsn.fm_serial_number series
    and nvl (wsn.ti_serial_number, wsn.fm_serial_number)

    Thank you
    Claire

  • Query to find the nth highest salary...

    Hi guys,.

    I can't understand this query that we got a Web site. It is used to find the nth highest salary of the employee... Can someone explain to me please each and every part of it...

    The Charly is:

    Select distinct (a.salary)
    EMP a
    where 1 = (select count (distinct (salary))
    b emp
    where a.salary < = b.salary)

    The "BOLD" part which is the return value... is my main question about this query...

    Help, please

    It is called a correlated sub query. The inner query is executed for each iteration of the outer query. For example, if the table emp has 14 rows and then for each salary 14 the inner query will run.
    The part

    select count(distinct(sal))
    from emp b
    where a.sal<=b.sal
    

    actually counts the number of treatments that are less than or equal to the treatment of the outer query.
    Clearly for the King, who gets the highest salary is greater than or equal to 1 (himself). It returns the highest salary.

    SQL> select *
      2  from emp a
      3  where 1 >= (select count(distinct(sal))
      4  from emp b
      5  where a.sal<=b.sal)
      6  order by sal desc;
    
         EMPNO ENAME                               JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ----------------------------------- --------- ---------- --------- ---------- ---------- ----------
          7839 KING                                PRESIDENT            17-NOV-81       5000                    10
    

    Salary of the first two.

    SQL> ed
    Wrote file afiedt.buf
    
      1  select *
      2  from emp a
      3  where 2 >= (select count(distinct(sal))
      4  from emp b
      5  where a.sal<=b.sal)
      6* order by sal desc
    SQL> /
    
         EMPNO ENAME                               JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ----------------------------------- --------- ---------- --------- ---------- ---------- ----------
          7839 KING                                PRESIDENT            17-NOV-81       5000                    10
          7902 FORD                                ANALYST         7566 03-DEC-81       3000                    20
          7788 SCOTT                               ANALYST         7566 09-DEC-82       3000                    20
    
  • Query to find the location

    Hello

    How can I find which location has been selected at the time of patching
    is there any query and a front end method to find the same
    It's about the HRMS patches


    Thank you

    .

    Hello

    Please see the following documents (including the reference documents).

    Note: 269705.1 - Question about prerequisite HRGlobal Patch
    How can note: 269286.1 - I find the Version of human resources (HR) on my system?

    Kind regards
    Hussein

  • Setup cannot create or find the partition on the SSD system

    I'm trying to install windows 7 on my PC which has a 120 GB OCZ SSD. It ran windows XP very well. I get to the screen where you choose the partition to install to. When I click Next, I get the following error: "Setup could not create a new partition or system to locate a system partition. See logs of installation for more information".

    Currently, the drive is a large partition and the type is the system. I can format or delete, and then click new partition, but that by default uses the primary type, which does not work either. Extend is gray and I have not found any drivers for the OCZ SSD.

    Don't think it will be serious, but here are the specs of the system. Core 2 Quad 2.66 Ghz, Nvidia 9800 GTX, OCZ 4 GB of ram, 120 GB SSD, 500 GB HARD drive (do not want to install here because of files I need and no reason to install here when I have an SSD), DFI Lanparty X 48 LT - R (not 100% on the - r)

    Hello Carl,

    Please use the Forums for Microsoft Windows.

    Sorry, you have a problem with that!  Have you tried to update your firmware?   I shows that there is also a 'Community' on the OCZ website section.
     http://www.ocztechnologyforum.com/Forum/FAQ.php

    I've added a link below that I believe will help.
    Support and questions for SSDS
    http://blogs.msdn.com/E7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx

    If still no luck, please click on the link provided below to submit this question to the Windows 7 Forums.  You can also search FAQ so that present.  Thank you!

    Windows 7 Installation, Setup, and deployment:
    http://social.technet.Microsoft.com/forums/en/w7itproinstall/threads
    Engineer James Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for