Stuck with query on dba_tab_partitions because of long .

Hi,
I'm trying to dynamically generate split partition sql but stuck with error ORA-00932: inconsistent datatypes: expected NUMBER got LONG.
Here is my code.
select 'alter table ' || table_owner || '.' || table_name || ' split partition P_MAX at ' || high_value
from (
select rownum rnum, t.* from (
    select t.* from dba_tab_partitions t where t.table_owner = 'TEK' and t.table_name = 'TAB' order by t.partition_position desc
                ) t 
where rnum between 2 and 5 and (num_rows != 0 or empty_blocks != 16383);Basically I'm trying to generate new partition with high_value = high_value + 3000 .
That long is really annoying .
My DB is 9.2.0.8 .
Regards.
Greg

Not sure if this is the best way, but I think it'll work:
create a dummy table that holds the data of dba_tab_partitions but using to_lob(high_value) as high_value.
then issue your select from this dummy table using to_number(high_value)
Hope this helps.

Similar Messages

  • I just bought a used iphone 5 and i am stuck with the icloud page because the old owner dont remember his password what should i do ?

    i just bought a used iphone 5 and i am stuck with the icloud page because the old owner don't remember his password what should i do ?

    Ask him for your money back.
    Pete

  • Currently stuck with a locked iPhone because of Applecare

    I have an iPhone 3GS that is a replacement phone provided by Applecare warranty when my original iPhone 3GS seriously overheated and met an early demise. The original iphone when it was replaced by Applecare was already out of contract (as it was replaced on the AT&T contract by a new iPhone 4).
    Last month I submitted a request to AT&T to unlock my 3GS as it predessor had completed the stipulations of the contract.  However my request was denied by AT&T because they show no record of my replacement phone's IMEI number in their system...they only have the original (the one that Apple took possession when they replaced it with my currrent locked 3GS).
    I was informed by an AT&T supervisor that I under their policy they cannnot unlock the replacement 3GS because that specific phone did not meet the terms of the contract.  They could however unlock my original iPhone, which is of no use since it's dead and now Apple's.
    Does anyone have any suggestions on anyone that I could turn to for help on this?
    Thanks in advance...

    Thank you very much for your suggestion. I went in an Apple Store in Italy and they unlocked my locked iPhone in only 2 days, and I have not to pay for this. Thanks  to the Genius Bar guy of tha Carosello Apple Store in Carugate, Italy, for his help. I love Apple forever!

  • I've stuck with Entourage way too long. Now I don't dare install the Mavericks OS because all my Entourage files will go away. And my iMac won't open Mac Mail (probably because I've never opened it in the 5 - 6 years I've owned the Mac.) Any suggestions?

    I've stuck with Entourage way too long. Now I don't dare install the Mavericks OS because all my Entourage files will go away. And my iMac won't open Mac Mail (probably because I've never opened it in the 5 - 6 years I've owned the Mac.) Any suggestions?

    If you are wondering why you are not getting any responses, it is because you have vented a complaint without any details that make any sense or give anyone something to work on.
    If you want help, I suggest actually detailing what has happened, with versions of software etc. Anything that would let us assist.
    As a start I am guessing that you have not really got the hang of "How it all works". Firstly download the Pages09_UserGuide.pdf from under the Help menu. Read that and view the Video Tutorials in the same place. A good addition would be the iWork 09 Missing manual book and something to help you learn how to use your Mac.
    If there are specific tasks you need help with:
    http://www.freeforum101.com/iworktipsntrick/index.php?mforum=iworktipsntrick
    Is a good resource.
    Peter

  • ICloud backup is unable to access the account, because email I used for iCloud account is been deleted. And my iPad is stuck with this note on a screen, can't go Settings. How do I delete my account?

    iCloud backup is unable to access my account, because email I used for iCloud account is been deleted. And my iPad is stuck with this note on a screen, can't go Settings. How do I delete or edit my iCloud account?

    You can eirther I think go on ITunes or if you can get to settings you would just go to iCloud.

  • HT201210 I am stuck with "The iPad could not be restored because the firmware file was corrupt" message.

    Hi
    I have an iPad mini and it was on iOS 6.1.3, my friend came and he said that he knows how to install iOS 7 for me. I gave it to him and he tried to install it, but apparently he failed to do so and an "Activation Error" is appearing on the screen now asking me to register in the developers program.
    Now, we are trying to restore it back to iOS 6.1.3 using iTunes, the software downloads well and it starts restoring but that I keep getting this error message "The iPad could not be restored because the firmware file was corrupt.".
    I am sure that the file is not corrupted because it's downloaded via iTunes regular download and it's not from an outside source.
    I am stuck with this now and my iPad is useless this way.
    Please any suggestions ?

    basselsamo wrote:
    Please any suggestions ?
    Yes, don't download Beta Software that you have no business or legal right to download and quit taking bad advice from friends.
    Now to maybe get you out of the restoring jam, the only thing that I can think of that might work is to use recovery mode, unless you already tried it and it didn't work.
    You can read about it here, but the instructions are posted below.
    http://support.apple.com/kb/ht4097
    Disconnect the USB cable from the iPad, but leave the other end of the cable connected to your computer's USB port.
    Turn off iPad: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for iPad to turn off.
    If you cannot turn off iPad using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the iPad turns off, release the Sleep/Wake and Home buttons.
    While pressing and holding the Home button, reconnect the USB cable to iPad. When you reconnect the USB cable, iPad should power on.
    Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears you can release the Home button.
    If necessary, open iTunes. You should see the recovery mode alert that iTunes has detected an iPad in recovery mode.
    Use iTunes to restore iPad.

  • My iPad is stuck with a small blue screen saying iCloud Backup, this iPad hasn't been backed up in 4 weeks.Backups blah blah- Click OK. I can't get it off the screen and I can't use the iPad because of it. Can anyone out there help?

    my iPad is stuck with a small blue screen saying iCloud Backup, this iPad hasn't been backed up in 4 weeks.Backups blah blah… Click OK. I can't get it off the screen and I can't use the iPad because of it. Can anyone out there help?

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after the iPad shuts down, then press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10 seconds).

  • HT4623 ipad stuck with a connect to itunes sign but it won't update when connected because it says content is full

    ipad stuck with a connect to itunes sign but it won't update when connected because it says content is full

    You are in Recovery Mode
    http://support.apple.com/kb/ht4097

  • I have what I think is the original Ipad, and it will no longer send out emails.  Is it possible to update it, or am I just stuck with a $500 electronic device that will no longer work the way I need it to.  Some of the original apps will no longer work

    I have what I think is the original Ipad, and suddenly it will no longer send out emails and some of the apps that worked prior to the newer Ipads coming out will no longer work.  Can this be updated, or am I stuck with an expensive electronic device that will no longer serve my needs?

    Did you already update to the latest iOS; http://support.apple.com/kb/HT4623

  • Could apple send me an iPad air. All my friends are making fun of me because I'm stuck with the old device and no phone. I've had app problems with apple before so I think that it would only be fair to get a newer device. Thank You Apple

    Could apple send me an iPad air. All my friends are making fun of me because I'm stuck with the old device and no phone. I've had app problems with apple before so I think that it would only be fair to get a newer device. Thank You Apple

    First we aren't Apple just normal users just like you.
    Second provide Apple a feedback or send them a mail.
    Third they will never send you a free iPad Air.
    If you want one you have to buy it. (go for refurbished if the device is too expensive) or look for special prices.
    Contact iTunes support if you have a problem with an App.

  • I erased my windows partition using disk utility then realized I should have used boot camp, because now I can't resize the original partition and seem to be stuck with a ghost unusable space. Boot Camp now doesn't give me the option to install or re

    I erased my windows partition using disk utility then realized I should have used boot camp, because now I can't resize the original partition and seem to be stuck with a ghost unusable space. Boot Camp now doesn't give me the option to install or remove windows partition.

    Hi, Ralph,
    The problem is that I did erase the partition, using disk utility, but I can't go back to my original disk size pre-partition, as disk utility won't let me do it and gives the message "Couldn’t modify partition map because file system verification failed." When I try to use Boot Camp Assistant it won't let me select the third option to remove windows.

  • Can somebody help ??? iPhone 3Gs is stuck with an apple logo with the long loading bar. but iTunes popup say iPhone had been restored. iOS 4.3.3 to 4.3.4 or 5

    Can somebody help ???
    iPhone 3Gs is stuck with an apple logo with the long loading bar. but iTunes popup say iPhone had been restored. This happens when upgrading iOS 4.3.3 to 4.3.4.

    Thanks for your answer
    i've checked the host files, nothing referring to apple. The device has never been jailbroken...
    Is there something else i can do?

  • I wanted to restore my iphone 4s from 6.1 to 6.1.1 and itunes showed me (error -1) and i cant do nothing because its stuck with the itunes logo and the cable what should i do to fix it helppp please...

    i just wanted to restore from 6.1 to 6.1.1 on my iphone 4s and itunes gave me an error -1 and know it doesnt work i dont know if the warranty from 1 year of apple can fix it or what i can do to solve the problem... as i said i just wanted to update and know im stuck with the restore logo ( the itunes logo and the cable) need some help please!!!!

    no so i dont know what happened

  • Stuck with search query

    I am trying to search the whole record if any of the word matches with existing data in the rows of columns.
    First I was trying the following code:
    SQL> select prod from prod where prod like '%chromium ore%'
      2  /
    PROD
    chromium ore andconcentrates, ferro-chrome, silico-chrome
    chromium ore andconcentrates, ferro-chrome, silica-chrome, metal
    chromium ore andconcentrates, ferro-chrome, silica-chrome
    chromium ore andconcentrates, ferro-chrome, silico-chrome
    chromium ore andconcentrates, ferro-chrome, silico-chrome, metal
    chromium ore andconcentrates, ferro-chrome, silico-chrome
    6 rows selected.
    SQL> select prod from prod where prod like '%what is chromium ore%';
    no rows selected
    SQL> select count(unique(co_id)) from prod where (prod like upper('%ferro%') or prod like lower('%ferro%') or prod like initcap('%ferro%'));
    COUNT(UNIQUE(CO_ID))
                    3153
    SQL> select count(unique(co_id)) from prod where (prod like upper('%What is ferro') or prod like lower('%What is ferro') or prod like initcap('%What is ferro'));
    COUNT(UNIQUE(CO_ID))
                    0
    SQL> select count(unique(co_id)) from prod where (prod like upper('%What is ferro%') or prod like lower('%What is ferro%') or prod like initcap('%What is ferro%'));
    COUNT(UNIQUE(CO_ID))
                    0
    Then I advised to try "Oracle Text". I did the following steps
    create user test identified by test;
    grant connect, resource, dba, ctxapp to test;
    SQL> GRANT ctxapp, dba TO test;
    Grant succeeded.
    SQL> GRANT EXECUTE ON CTX_CLS TO test;
    Grant succeeded.
    SQL> GRANT EXECUTE ON CTX_DDL TO test;
    Grant succeeded.
    SQL> GRANT EXECUTE ON CTX_DOC TO test;
    Grant succeeded.
    SQL> GRANT EXECUTE ON CTX_OUTPUT TO test;
    Grant succeeded.
    SQL> GRANT EXECUTE ON CTX_QUERY TO test;
    Grant succeeded.
    SQL> GRANT EXECUTE ON CTX_REPORT TO test;
    Grant succeeded.
    SQL> GRANT EXECUTE ON CTX_THES TO test;
    Grant succeeded.
    SQL> connect test/test
    Connected.
    SQL> CREATE TABLE test (id NUMBER PRIMARY KEY, text VARCHAR2(200));
    Table created.
    SQL>
    SQL> INSERT INTO test VALUES(1, '<HTML>California is a state in the US.</HTML>');
    1 row created.
    SQL> INSERT INTO test VALUES(2, '<HTML>Paris is a city in France.</HTML>');
    1 row created.
    SQL> INSERT INTO test VALUES(3, '<HTML>France is in Europe.</HTML>');
    1 row created.
    SQL>
    SQL> CREATE INDEX idx_test ON test(text)
      2       INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS
      3       ('FILTER CTXSYS.NULL_FILTER SECTION GROUP CTXSYS.HTML_SECTION_GROUP');
    Index created.
    SQL>  SELECT SCORE(1), id, text FROM test WHERE CONTAINS(text, 'paris', 1) > 0;
      SCORE(1)         ID TEXT
             4          2 <HTML>Paris is a city in France.</HTML>
    SQL> SELECT SCORE(1), id, text FROM test WHERE CONTAINS(text, 'Where is Paris', 1) > 0;
    no rows selected
    SQL> select text  from test where (upper(text) like '%where is paris%' or lower(text) like '%where is paris%' or initcap(text) like '%where is paris%');
    no rows selected Still I stuck with searching technique. Please help me
    Thanks & best regards

    Hi,
    Whenever you have a question, it helps to post:
    (1) The version of Oracle (and any other relevant software) you're using
    (2) A little sample data (just enough to show what the problem is) from all the relevant tables
    (3) The results you want from that data
    (4) Your best attempt so far (formatted)
    Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
    If you can present your problem using commonly available tables (for example, tables in scott schema, or views in the data dictionary), then you can omit (2).
    Formatted tabular output is okay for (3).
    This does what you requested in Oracle 10 (and up):
    SELECT  prod
    FROM     prod
    WHERE     REGEXP_LIKE ( ' ' || prod || ' '
                  , '([^[:alnum:]]'
                    || REPLACE ( 'what is chromium ore'
                         , '[^[:alnum:]])|([^[:alnum:]]'
                    || '[^[:alnum:]])'
                 );If the string containing all the target words ('what is chromium ore' in the example above) contains some special characters (such as '.' or '*') the results might not be what you expect.

  • LDAP Query from Java taking abnormally long

    Is there any reason why this query would take an abnormally long time? When I run the query from the command line it comes back practically instantly, but when I access it via Java it takes close to 30 seconds.
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.NamingEnumeration;
    import javax.naming.NamingException;
    import javax.naming.directory.Attribute;
    import javax.naming.directory.Attributes;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.InitialDirContext;
    import javax.naming.directory.SearchControls;
    import javax.naming.directory.SearchResult;
    public class LDAPTest {
          * @param args
         public static void main(String[] args) {
              String username = System.getProperty("user.name");
              String LDAPServer = "ldap://ldap.myldapserver.net/";
              //String attribute = "";
              String query = "uid=" +username;
              Hashtable env = new Hashtable();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
            env.put(Context.PROVIDER_URL, LDAPServer);
            DirContext context = null;
            NamingEnumeration enumeration = null;
              try {
                   context = new InitialDirContext(env);
                SearchControls ctrl = new SearchControls();
                ctrl.setSearchScope(SearchControls.SUBTREE_SCOPE);
                enumeration = context.search("", query, ctrl);
                //while (enumeration.hasMore()) {
                     SearchResult searchResult = (SearchResult) enumeration.next();
                    Attributes attributes = searchResult.getAttributes();
                    Attribute attr = attributes.get("cn");
                    String cn = (String) attr.get();
                    System.out.println(" Person Common Name = " + cn);
            } catch (NamingException e) {
                throw new RuntimeException(e);
            } finally {
                if (enumeration != null) {
                    try {
                         enumeration.close();
                    } catch (Exception e) {
                if (context != null) {
                    try {
                         context.close();
                    } catch (Exception e) {
    }

    njb7ty wrote:
    One way to speed it up is to only retreive those attributes your interested in via ctls.setReturningAttributes.
    Also, if you know what sub directories you want to look in, you can create a list of just those subdirectories and look through them one at a time via ctls.setSearchScope(SearchControls.ONELEVEL_SCOPE);
    SearchControls ctls = new SearchControls();
    ctls.setReturningAttributes((String[])attrIDs.toArray(new String[attrIDs.size()]));
    //only look at the immediate folder level specified (not in sub-folders)
    ctls.setSearchScope(SearchControls.ONELEVEL_SCOPE);Hi, thanks. I tried these, unfortunately I don't know enough about ldap to set the onelevel_scope properly. I have narrowed it down as a combination of load and login issues. For example, in our test environment the java program returns instantly with anonymous. In our production environment it returns in about 30-40 seconds with no login credentials supplied. (it does allow anonymous access). I made sure I set the authentication to none when attempting to try this. But when I do an anonymous query from the command line via a ldapsearch program it pulls the results instantly. (i know it is anonymous because if I specify credentials it pulls back additional data). For some reason it just takes really long to resolve in our production environment if I try anonymous access and I haven't figured it out yet. When I supply login credentials to our production environment it comes back in under a fifth of a second.

Maybe you are looking for

  • NI 6534 fails resource test.

    The 6534 fails the 'resources test' under MAX. Nothing is connected to the board. Board otherwise seems to be producing NT crashes when used. Any clues? Thanks, Scott Details: Error Message: The device is not responding to the selected base address.

  • Alter table reaching the max number of char 4000, CLOB? NCLOB?

    I have a column is a table defined as a VARCHAR2(4000) I try to alter the table alter table sybaapc MODIFY  SYBAAPC_EXTRACURRICULAR VARCHAR2(5000)but it give me this error ORA-00910: specified length too long for its datatype I want the users to be a

  • Duplicate imported photos on the iPad

    Regarding duplicate imported photos on the iPad:   Is there an automated way to detect and delete duplicate photos, specifically imported from the camera connection kit.  Assume no iTunes syncing, mac or PC.  First party solution preferred, third par

  • How to block certain web pages?

    This web page opens by itself in a new tab and starts talking. http://malwarewarning.net/ It is an obvious scam. I have tried deleting cookies. Is their any way to get rid of this? It is very annoying.

  • IPhone 5c not recognised on Windows 7 pc or iTunes

    Arrrrggghhh kill me now!! Everything was find and everyone was friends until I decided to click on the update to iOS8 on iTunes. Now my iPhone 5c is stuck in the "iTunes connect' screen and my pc wont recognise on iTunes or in the Device Manager... A