How do I get the range of my latest partition

Hello All,
I have a range partitioned table. I would like to know the value of my latest partition. I tried using
SELECT high_value FROM user_tab_partitions WHERE table_name = 'TBL_NAME' ORDER BY partition_name DESC  but no luck.
I have partitions like
list_cmpgn_201101 values less than 64000
list_cmpgn_201112 values less than 65000
list_cmpgn_201201 values less than 66000.
It should give me 66000. Since that is my latest partition.
Thx
Shank.
Edited by: SamFisher on Feb 2, 2012 10:42 AM

You need to use PL/SQL:
SQL> select  high_value
  2    from  user_tab_partitions
  3    where table_name = 'RANGE_SALES'
  4  /
HIGH_VALUE
TO_DATE(' 1998-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 1998-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 1998-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 1999-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 1999-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 1999-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 1999-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 2000-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 2000-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 2000-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
TO_DATE(' 2000-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')
HIGH_VALUE
MAXVALUE
12 rows selected.Now:
create or replace
  type DateList
    as
      table of date
declare
    v_DateList DateList := DateList();
    v_max_high_value date;
begin
    for v_rec in (select high_value from user_tab_partitions where table_name = 'RANGE_SALES') loop
      if v_rec.high_value != 'MAXVALUE'
        then
          v_DateList.extend;
          execute immediate 'begin :1 := ' || v_rec.high_value || '; end;'
            using out v_DateList(v_DateList.count);
      end if;
    end loop;
    select  max(column_value)
      into  v_max_high_value
      from  table(v_DateList);
    dbms_output.put_line('Table RANGE_SALES max high value is ' || to_char(v_max_high_value,'MM/DD/YYYY HH24:MI:SS'));
end;
Table RANGE_SALES max high value is 10/01/2000 00:00:00
PL/SQL procedure successfully completed.
SQL>SY.

Similar Messages

  • How can i get the exact Range of  codePoints of every UnicodeScript(Block)?

    hello dear all,
    this problem has puzzled me for a long time.
    how can i get the exact Range of codePoints of every UnicodeScript(Latin,Han,.....) or UnicodeBlock(Basic_Latin, Latin-1 Supplement, Linear B,......)?
    so that i can do some iterations to display the Unicode Mapping (like the Windows Unicode Mapping tool in Start\all Programs\Accesories\System tools\Unicode Mapping.)
    i only know that the property(Script, Block, Age....whatever) of a codePoint can be known through the methods:
    UScript.getScript(0x21) ........==>Latin
    but how can i get the Range of Latin as follows:
    0041..005A    ; Latin # L&  [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z
    0061..007A    ; Latin # L&  [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z
    00AA          ; Latin # L&       FEMININE ORDINAL INDICATOR
    00BA          ; Latin # L&       MASCULINE ORDINAL INDICATOR
    00C0..00D6    ; Latin # L&  [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS
    00D8..00F6    ; Latin # L&  [31] LATIN CAPITAL LETTER O WITH STROKE..LATIN SMALL LETTER O WITH DIAERESIS
    00F8..01BA    ; Latin # L& [195] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER EZH WITH TAIL
    01BB          ; Latin # Lo       LATIN LETTER TWO WITH STROKE
    01BC..01BF    ; Latin # L&   [4] LATIN CAPITAL LETTER TONE FIVE..LATIN LETTER WYNN
    01C0..01C3    ; Latin # Lo   [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK
    01C4..0293    ; Latin # L& [208] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER EZH WITH CURL
    0294          ; Latin # Lo       LATIN LETTER GLOTTAL STOP
    0295..02AF    ; Latin # L&  [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL
    02B0..02B8    ; Latin # Lm   [9] MODIFIER LETTER SMALL H..MODIFIER LETTER SMALL Y
    02E0..02E4    ; Latin # Lm   [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP
    1D00..1D25    ; Latin # L&  [38] LATIN LETTER SMALL CAPITAL A..LATIN LETTER AIN
    1D2C..1D5C    ; Latin # Lm  [49] MODIFIER LETTER CAPITAL A..MODIFIER LETTER SMALL AIN
    1D62..1D65    ; Latin # L&   [4] LATIN SUBSCRIPT SMALL LETTER I..LATIN SUBSCRIPT SMALL LETTER V
    1D6B..1D77    ; Latin # L&  [13] LATIN SMALL LETTER UE..LATIN SMALL LETTER TURNED G
    1D79..1D9A    ; Latin # L&  [34] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK
    1D9B..1DBE    ; Latin # Lm  [36] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL EZH
    1E00..1E9B    ; Latin # L& [156] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER LONG S WITH DOT ABOVE
    1EA0..1EF9    ; Latin # L&  [90] LATIN CAPITAL LETTER A WITH DOT BELOW..LATIN SMALL LETTER Y WITH TILDE
    2071          ; Latin # L&       SUPERSCRIPT LATIN SMALL LETTER I
    207F          ; Latin # L&       SUPERSCRIPT LATIN SMALL LETTER N
    2090..2094    ; Latin # Lm   [5] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER SCHWA
    212A..212B    ; Latin # L&   [2] KELVIN SIGN..ANGSTROM SIGN
    2132          ; Latin # L&       TURNED CAPITAL F
    214E          ; Latin # L&       TURNED SMALL F
    2184          ; Latin # L&       LATIN SMALL LETTER REVERSED C
    2C60..2C6C    ; Latin # L&  [13] LATIN CAPITAL LETTER L WITH DOUBLE BAR..LATIN SMALL LETTER Z WITH DESCENDER
    2C74..2C77    ; Latin # L&   [4] LATIN SMALL LETTER V WITH CURL..LATIN SMALL LETTER TAILLESS PHI
    FB00..FB06    ; Latin # L&   [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST
    FF21..FF3A    ; Latin # L&  [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z
    FF41..FF5A    ; Latin # L&  [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Zdo i have to write a ScriptParser or BlockParser myself for the Scripts.txt (http://www.unicode.org/Public/5.0.0/ucd/Scripts.txt) and Blocks.txt (http://www.unicode.org/Public/5.0.0/ucd/Blocks.txt)o get the Range ???
    does anyone know?
    thanks in advance
    amy

    Core Java APIs don't have the ability to give your a code point range for a specific UnicodeBlock. You can, however, iterate through code points to generate the range...not particularly efficient. However, you'd only have to do this once. Alternatively, you can parse the Unicode file that defines the blocks. I can also imagine a very simple class that you could provide yourself. I think that providing the range seems like a reasonable enhancement to the core apis...you might consider submitting an Request for Enhancement (RFE).

  • I get a neighbor's wifi on my MacBook in my bedroom.  How can I extend the range to the MacMini in my living room?

    I get a neighbor's wifi on my MacBook in my bedroom.  How can I extend the range to the MacMini in my living room?

    You can't. It's not your network.

  • How to get the range of a textbox in the footer of the 1st page ?

    Just like the problem says, how do I use VBA to get the range of the textbox in the footer of the 1st page?

    getCellRect(...);

  • How do you get the best Range?

    How do you get the best range on the Extreme? I am very unfamiliar with the settings and what they mean.

    The default settings on the AirPort Extreme are set for maximum radio power so it will produce the best range without further adjustments.
    The actual range of the device will depend on the number of obstructions in the signal path between the AirPort Extreme and the other device that is connecting to it.

  • When syncing iPod the PC lost power. once power restored synced iPod but the sleeve detail has been blanked. Also when syncing a 'miss-match' message is reported on iTunes. how do I get the sleeve detail back onto iPod?

    When syncing iPod the PC lost power. once power restored synced iPod but the sleeve detail has been blanked. Also when syncing a 'miss-match' message is reported on iTunes. how do I get the sleeve detail back onto iPod?

    http://ww2.cs.fsu.edu/~rosentha/linux/2.6.26.5/docs/DocBook/libata/ch07.html#excatATAbusErr wrote:
    ATA bus error means that data corruption occurred during transmission over ATA bus (SATA or PATA). This type of errors can be indicated by
    ICRC or ABRT error as described in the section called “ATA/ATAPI device error (non-NCQ / non-CHECK CONDITION)”.
    Controller-specific error completion with error information indicating transmission error.
    On some controllers, command timeout. In this case, there may be a mechanism to determine that the timeout is due to transmission error.
    Unknown/random errors, timeouts and all sorts of weirdities.
    As described above, transmission errors can cause wide variety of symptoms ranging from device ICRC error to random device lockup, and, for many cases, there is no way to tell if an error condition is due to transmission error or not; therefore, it's necessary to employ some kind of heuristic when dealing with errors and timeouts. For example, encountering repetitive ABRT errors for known supported command is likely to indicate ATA bus error.
    Once it's determined that ATA bus errors have possibly occurred, lowering ATA bus transmission speed is one of actions which may alleviate the problem.
    I'd also add; make sure you have good backups when ATA errors are frequent

  • How do I get the 1121 card to read the switch and make it a 1 or 0 to count pulses?

    Hello,
    I am developing a test stand to test tires. We have LabView 7.1 and the SCXI chassis with an 1121 transducer card. I am trying to count the rate and total number of revolutions made by the tire. The signal is acquired from a 12V-proximity switch that is actuated once per RPM. The tire turns at 1,000 RPM or a little more.
    The signal will have to go through a 100-foot cable to get to the LabView chassis, will this be a problem?
    How do I get the 1121 card to read the switch and make it a 1 or 0 to count pulses?
    Will LabView be able to read this many pulses per second?
    How do I get MPH and a RPM reading out of it?
    Thank you,
    James Happe

    Hi James,
    Since you are cabling your DAQ board to an SCXI chassis with an 1121, you will not be able to use your counters without additional hardware.
    The 1121 is an analog input signal conditioning module. It performs filtering and attenuation to help measure analog signals. What it does not have is access to your board's counter pins.
    In order to use your counter pins you will need to get the necessary hardware. You have two options:
    1) Buy and SCB-68. This is a breakout box that will cable directly to your DAQ board replacing your SCXI chassis. You can connect your signals directly to your counter with this. However, I would advise against this because your application has a 12 volt signal. This will overload the 5v maximum voltage for your counter pins.
    2) Buy a 1180 feedthrough panel. This will allow you to use all of your DAQ board's functions with the SCXI chassis. Withouth the 1180 feedthrough panel, the SCXI-1121 is the only thing connected to your DAQ board. Since the 1121 only performs conditioning on the analog inputs, that is all you can access. The other pins cannot be used (no access). With the 1180 feedthrough panel, you can put a connector block on and access all of your other pins (including the counter pins). Again, I would advise against this since your 12 volt signal will overload your counter pins.
    My suggestion would be to perform an analog input task. Set up your 1121 in MAX and use a LabVIEW shipping example. In the shipping example select an analog input channel from your SCXI-1121 module. Set the appropriate voltage range and take some measurements. Once your signal is connected and you can read it using an analog input example you are half way there.
    Take the analog input shipping example and modify it to perform frequency analysis on the voltage readings. You can simply wire the data from the DAQmxRead VI into one of the frequency analysis VI's (noted in my first post). The output if that VI will give you the frequency of your signal.
    -Sal

  • How would I get the date of last Monday?

    How would I get the date of last Monday?

    I've done the following, does it seem right?
    public static const millisecondsPerDay:int = 1000 * 60 * 60 *
    24;
    * This function sets the mimimum and maximum range
    private function sliceChartWeek():void{
    var max:Date = new Date();//current date is our max from
    which we will calculate the min
    var day:uint = max.day;
    var min:Date = new Date(max.getTime() - (millisecondsPerDay
    * (max.day - 1)));
    dateTimeAxis.minimum = min;
    }

  • Formula or solution to get the range between numbers in on column (KF)

    Hello All,
    I am in need of a solution (formula) to get the range of numbers in one column of query results.
    I have a variable number of sales orders and three keyfigures that show the number of days between when the order was received and when the customer received the order.
    I need to get the range of days from each keyfigure column
    ex.
    Sales Order          Days-Order to Box   Days-Order to Release   Days-Release to Box
    SO 11111                       10                                   2                                 8
    SO 11111                       13                                   5                                 8
    SO 11111                       12                                   2                                10
    SO 11111                       16                                   4                                12
    The range for the  Days-Order to Box   Days-Order to Release   Days-Release to Box
                                             6                                     3                                 4
    I have tried using formulas for Min and Max setting the Calculations tab for both Results and Singles Values
    than creating a formula using SUMCT, SUMRT and SUMGT but I get the red X for results.  I have used NOERR(x) and NODIV(x)
    to determine that the formula is seen as having undefined calculations or errors in the logic (I do not get errors when saving the query).
    NOERR(SUMRT (OtB-Max - OtB-Min))
    OtB-Max is a formula that hides the singles values and displays the results as the Maximum number in the column Days-Order to Box
    OtB-Min is the same kind of formula but it displays the Minimum number for the same column.
    Thanks in advance for any suggestions.
    Btw - I have searched this forum and the How-To forum for BI on the SAP site without finding an answer -
    If I have missed one in my search I apologize and would appreciate a link to it

    Hi.
    As I think only use of virtual KF and APA code will help you.
    Regards.

  • How can i get the current number of word in paragraph?

    I have cursor set on some word in Para. And i'd like to make italic all words before it. How can i get the number of current word in collection Words in mInd.Selection.Item(1)?

    Hi Dmitry1776,
    Try something like this:
    Set myInsertionPoint = myInDesign.Selection.Item(1)
    Set myStory = myInsertionPoint.ParentStory
    Set myStartCharacter = myStory.Characters.Item(myInsertionPoint.Paragraphs.Item(1).Index)
    Set myCharacter = myStory.Characters.Item(myInsertionPoint.Index)
    Set myEndCharacter = myStory.Characters.Item(myCharacter.Words.Item(1).Index - 1)
    Set myText = myInsertionPoint.ParentStory.Texts.ItemByRange(myStartCharacter, myEndCharacter).Item(1)
    ...at this point, myText is a range of text from the start of the paragraph to just before the text containing the insertion point.
    Thanks,
    Ole

  • I am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier

    i am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier photo please help me to recover my photos

    Well I'll guess you're using iPhoto 11:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • I accidentally erased a music album that I purchased on iTunes. How can I get the iTunes store to recognize that it is no longer in my iTunes library and download it again?

    I accidentally erased a music album that I purchased on iTunes. How can I get the iTunes store to recognize that it is no longer in my iTunes library and download it again?

    Delete the broken links in iTunes then look at your purchased list to redownload.
    If this happened because you were deleting files from the iTunes folder in Finder, don't.  You have to let iTunes do all the deleting and moving or you will end up with broken links.

  • How can I get the iCloud/iTunes password for my (now) deceased Father-in-Law's Imac?  I have a list of his passwords, but nothing works!

    How can I get the iCloud/iTunes password for my (now) deceased Father-in-Law's iMac?  I have a list of his passwords, but nothing works!  I know his email, but that account has been cancelled for security purposes, so we can't just request a new one.  I tried his security questions to no avail.
    Thanks

    Since that password is tied to his Apple ID, you will need to contact Apple; as far as I know, it will be a somewhat lengthy procedure and you will  need to furnish necessary paperwork (including a death certificate as far as I know). Best to either stop at an Apple store or call them to find out exactly what it is you need to do.

  • I deleted a calendar tab. How can I get the data back?

    I accidently deleted the calendar tab of my wife and deleted all her apoointments on her iphone and the iMac. I am in ****. How can I get the calendar data back=?

    Sync is only oneway, from PC to your device. Unless you have the music on your PC, iTunes is going to wipe out what you have on your device if you are syncing to a new library.
    You can only transfer Purchased music over to Itunes on your PC.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    As for you own music, you may have to use a third party software. A good Free one is called Sharepod which you can download from Download.com here:
    http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2

Maybe you are looking for