Can anyone explain this? ORA-01722

Hi all,
Can anyone understand this?
I have 3 database servers both running on windows 2000 advanced server, they're used by the development team. Also we have our production database.
The 3 databases are cloned from the production, so database configuration parameters are all equal. Today I've received a query from the development team to run on the production, the query is just simple like this:
SELECT *
FROM x
WHERE x.field_v = 177762522
I get this error
ORA-01722: invalid number
this is a hudge table, and the fiedl_v is a varchar2(9) type.
The worst thing is that on the others 3 databases this query returns results, except on the production.
So, can anyone explain me why does the implicit (char to number) conversion occours on the development databases , and fails on the production? What are the main reasons that can influence datatype conversion like this one?
Both databases have the 9.0.6 patch.
The 3 development BD's are totally cloned from the production.
Thanks.

William:
There is no guarantee on the order of evaluation of the predicates. Even with your isnum function, the invalid number could arise. The only safe way is to compare strings to strings as in your first example.
To make the isnum "safe", you would need something more like:
SELECT *
FROM (SELECT *
      FROM x
      WHERE isnum(x.field_v) = 'Y' and
            ROWNUM > 0)
WHERE x.field_v = 177762522;The ROWNUM > 0 predicate in the in-line view will prevent predicate pushing and guarantee that the isnum condition is evaluated first.
John

Similar Messages

  • Can anyone explain this: Numeric or Value Error Line 1

    I have a stored procedure that starts out like so:
    PROCEDURE test_proc(param1 IN VARCHAR2, param2 IN VARCHAR2, param3 OUT
    SYS_REFCURSOR) IS
    v_var varchar2(5);
    BEGIN
    SELECT * FROM. . .
    The procedure tested fine in PL/SQL Developer. When calling from
    ODP.NET like so. . .
    OracleCommand cmd = new OracleCommand("test_proc", <connection>);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.Add("param1", "somevalue");
    cmd.Parameters.Add("param2", "XX");
    cmd.Parameters.Add("param3", OracleDbType.RefCursor,
    ParameterDirection.Output);
    DataSet ds = new DataSet();
    OracleDataAdapter da = new OracleDataAdapter(cmd);
    con.Open();
    da.fill(ds);
    con.Close();
    . . .the procedure executed as expected. If I changed the value of
    param2 to "XXX" or any value three chars long I got the "ORA-06502:
    Numeric or Value Error at Line 1" error.
    After beating my head against the wall for hours, I tried changing the
    size of v_var to 50, and the error disappeared. Mind you, the error
    was being thrown long before v_var was being set further down in the
    proc. Even more interesting is that the possible values of v_var were
    all less than 5 chars wide. Most interesting: the value of p_param2 had nothing whatever to do with v_var.
    Can anyone explain this?

    Hi,
    Is your database 9206 by chance? Re: Error ORA-06502 PL/SQL
    Cheers,
    Greg

  • Can anyone explain this to me, please. It's a static section question.

    Can anyone explain this to me, please. It's a static section question.
    I came across the following style of programming recently and I would like to know what the Static section is actually doing in the class. Thx.
    Here is the code.
    public class ClassA {
         private static Hashtable ClassAList = new Hashtable();
         private ClassB cB;
         private Vector goodLink;
         private Hashtable classCList;
         static
              ClassA cA = new ClassA();
              ClassAList.put("whatever", cA);
         public static ClassA getClassA()
              return (ClassA) ClassAList.get("whatever");

    hi,
    The static section shall be loaded before it's constructor is called. (i.e at the time of loading the class). Therefore making it available for any other objects to call.
    hope this clarifies ur question
    prasanna

  • Can anyone explain this query.?

    Can anyone explain this query.?
    select nvl(s.p_id,q.p_id),nvl(s.p_type,q.p_type),nvl(s.p_line,q.p_line),
    nvl(s.sales2004,0),nvl(s.sales2005,0),nvl(q.quota2004,0),nvl(q.quota2005,0)
    from sales s
    full outer join quota q on(s.p_id = q.p_id and s.p_type=q.p_type and s.p_line=q.p_line)

    from sales s full outer join quota qTable quota is outer joined to table sales , if there are no matching records in table quota then also the query retuns the sales record with null values for the corresponding quota record columns
    NVL() has been used to handle such cases

  • HT3275 Please can anyone explain this to me

    Please can anyone explain this to me - thank you -
    Time Machine couldn't complete the backup to time capsule - The backup disk image “/Volumes/Data-1/Alyson’s iMac.sparsebundle” is already in use.

    The explanation is a long standing bug in Lion and Mountain Lion, but what you might really be asking is how to fix the problem.
    Pull the power cord from the back of the Time Capsule
    Wait a few minutes
    Plug the power cord back in
    If that does not fix the problem you will need to dig deeper.  See #C12 in Pondini's excellent Time Machine - Troubleshooting.
    http://pondini.org/TM/Troubleshooting.html

  • When i go to my music and play a song it sounds like my headphones are blown but when i play songs on youtube they sound fine, can anyone explain this to me? please and thank you

    when i go to my music and play a song it sounds like my headphones are blown but when i play songs on youtube they sound fine, can anyone explain this to me? please and thank you

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.      

  • TS3988 I have an icloud account and I view my mail with Mail V5.2. I recieve my email but the senders get messages saying the delivery failed. Can anyone explain this or help me.

    I have an icloud account and I view my mail with Mail V5.2. I recieve my email but the senders get messages saying the delivery failed. Can anyone explain this or help me.

    Thank you for replying.    Yes I deleted the old email address..   

  • I went to silence my iPhone 5s and had a box pop up--looked like one of those boxes telling me turning on Location Services would help--telling me I needed to change my password within 60 minutes.....I turned the phone off.  Can anyone explain this to me?

    I went to silence my iPhone 5s and had a box pop up--looked like one of those boxes telling me turning on Location Services would help--telling me I needed to change my password within 60 minutes.....I turned the phone off.  Can anyone explain this to me?

    I went to silence my iPhone 5s and had a box pop up--looked like one of those boxes telling me turning on Location Services would help--telling me I needed to change my password within 60 minutes.....I turned the phone off.  Can anyone explain this to me?

  • HT1430 I downloaded the lateest update and I can't turn off my apps like I did on 6os. The 7os is different and I can't seem to find out if apps turn off now by just closing them. Can anyone explain this to me? Please

    I downloaded the lateest update and I can't turn off my apps like I did on 6os. The 7os is different and I can't seem to find out if apps turn off now by just closing them. Can anyone explain this to me? Please

    Double tap the Home button and swipe the app preview page up
    iOS 7  also allows apps to run while they aren't open.
    You can manage these here:
    Settings > General > Background App Refresh

  • Post Moved Can anyone explain this baffling puzz...

    Post moved to Other BB Queries http://community.bt.com/t5/Other-BB-Queries/Can-anyone-explain-this-baffling-puzzle-with-BT-Total-BB...
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

    I tend to think that the comments about MAC address filtering and wireless security are a bit misleading - if these things were the problem then it would not work at all as opposed to working sporadically.
    I must admit, reading your post I had exactly the same problem moving into a new house last year, my desktop PC in my room would get terrible wireless reception with constant erroring and was practically unusable whilst a laptop sat next to it was just fine. I tried a million different things and eventually bought an external wireless antenna like the one here:
    Edimax EA-IO7D 7dBi Indoor Omni-Directional High Gain Antenna with Desktop Stand - 1m Cable
    It solved the problem for me though I am still mystified as to what the problem is - I suspect that there is something in the environment causing interference though I don't know what. My house is of average size and fairly modern with thin walls so I would not anticipate any problems.
    Some things to try are to move the PC right next to the hub (or vice versa, whichever is easier) and see if this improves things or borrow a wireless router from a friend, turn off all encryption and see what signal strength you get there.

  • The home button has stopped working on my iphone 5c. Did the same a few months ago and recovered 24hrs later. Can anyone explain this problem. Phone still in warranty. Had steam issue recently but this was after last home button episode.

    Have an iphone 5c 8g. The home button has stopped working. Did the same a few months ago and recovered 24hrs later. Can anyone explain this problem. Phone still in warranty. Had steam issue recently but this was after last home button episode and no evidence of damage.

    If you are playing in hockey arenas a lot or if you are bringing it into bathroom same time as shower it may not seem like much but overtime the steam can acquire and build up in the phones usb dock flex cable swell as the home button flex cable. Bring again into apple store and should be covered under warranty again. could also be a delay in a 8gb 5c software may just be very lag.

  • Can anyone explain this behavior and tell me how to fix it?

    Using NetBeans 6.5 on Windows, Glassfish v2.1
    I have a JSF application with a page that has a tab set.
    On one of the tabs I have a panel with company information.
    One of the components on the page is an InputText field with the value bound to a session bean variable.
    The tab also has an Add button.
    Here is what the JSP looks like for the input text and button components
       <h:inputText binding="#{MainPage.companyNameTF}" id="companyNameTF" readonly="#{SessionBean1.readOnlyFlag}"
       <h:commandButton action="#{MainPage.mainAddBtn_action}" disabled="#{SessionBean1.disableEdit}" id="mainAddBtn"
            style="font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; left: 425px; top: 380px; position: absolute; width: 75px" value="Add"/>
         This is all plain vanilla stuff and I would expect that when the Add button is pushed, the session bean property would be filled with
    the value entered in the input text field.
    In the java code for the page, I have a method to process the Add button push.
    Originally, it just called a method in the session bean to check that a value was entered in the input text field by checking the bound
    session bean property.
    For some reason, that was not getting filled and I was getting either a null or empty string rather than the value in the text field.
    I added some checking in the method that processes the Add button push so I could check the values in the debugger.
    Here is a sample of that code:
        public String mainAddBtn_action() {
            String s = sb1.getCompanyName();
            s = (String)this.companyNameTF.getValue();
            s = (String)this.companyNameTF.getSubmittedValue();I check this in the debugger and NONE of the variants that I have listed have the value that was entered into the text field.
    The submittedValue is null and the others are empty strings (that is what they were initalized to).
    This is all pertty straight forward stuff and I am at a loss to explain what is happening.
    Can anyone expain this behavior, and, most important, how can I force the values to be present when the Add button is pushed.
    I have never experienced this problem before, and have no clue what is causing it.
    Thanks.

    Basically, the component bindings are just being used in plain vanilla get/set modes.
    I set them to "" when I do a clear for the fields and they are set to a value via the text field.
    No other action other than to read the values via get to insert them into the database.
    And, I always use the get/set methods rather than just setting the value directly.
    This is what is so strange about this behavior - I have created dozens of database add/update/delete pages using this same model and have not had a problem with them - even in a tab context.
    Not a clue why this one is different.
    I did notice that I had an error on the page (in IE7, you get a small triangle warning sign when something is not right).
    I figured that might be the problem - maybe buggering up the rendering process.
    I tracked that down and do not get that anymore (it had to do with the PDF display I was trying to get working a while back), but that did not resolve the problem.
    I don't think there are any tab conflicts - none of the components are shared between tabs, but I will see what happens when I move a couple of the components out of the tab context.
    I noticed that it seems to skip a cycle. Here is what I can do.
    1) Fill in text fields and add a record - works fine the first time.
    2) Clear the text fields
    3) Enter new data in the text fields and push Add
    4) I get an error saying fields are blank from my data check process.
    5) Enter new data and push Add - the record is added with the new data.
    My work around is to not enter data in step 3 and just accept the error message in step 4, then go ahead and enter the real data in step 5.
    Very ugly, but it works every time.

  • Can ANYONE explain this IDIOCY?

    If I have an IFieldObject or ITextObject with the default height of 221 twips for an Arial 8.25pt or Tahoma Bold 8.25 font.
    Why is that a IBoxObject where I set the Top the same as my IField or ITextObject and set the bottom to the Top + 221 twips, the bottoms DON'T LINE UP. Aren't they all 221 twips in height, right?
    Same goes with the width...It befuddles me to work in this designer and not have things equal. Also, why in the world would they not give the IBoxObject a HEIGTH property?
    How wide is the crSingleLine? 20 twips? I understand that when you set the border the actual height/width grows but the values don't reflect it, is that true?
    Can anyone explain the idocy of the measurements and drawing elements in this, used to be good but now is a piece of crap, product? Is there any documentation on this "feature" anywhere? I can't find anything about this in the user guides or help. I'm using 10.2.3600 (sp1) in VS.Net2005 (w/VB.net)

    I have deleted the last reply because of the language used in it. I am also locking this thread so no more replies can be added to it.
    If you want to get replies to your postings please follow the rules of engagement: https://wiki.sdn.sap.com/wiki/x/FgQ
    Be professional, polite, and give us information we need to help you. Remember "us" is not just SAP but all of us in the forum community. Someone other then an SAP engineer may help you, just like you may one time elect help another community member's posting.
    Please feel free to repost your questions in this forum following the "Rules of Engagement". Not following these rules will get postings deleted or ignored.
    Kind Regards,
    Trevor Dubinsky
    Senior Engineer,
    SAP, Business Objects.

  • Can anyone explain this ADVANCED problem?

    I created a RAM disk on my Performa 6360 (running OS 9.1 136MB RAM) one day and after I rebooted the Mac was not bootable. I did the following to get it to boot, none of which worked.
    1. Booted with extensions off
    2. Booted with the OS 9.x, OS 8.5, OS 8.1, and TTP CD-ROMS
    3. Booted with a Zip disk
    Nothing worked and the Mac was not bootable. I believe I also tried clearing the PRAM and still the mac was not bootable.
    The solution however was to boot from a floppy created with the OS 8.1 CD-ROM some time ago, trash the memory prefs and bang the mac was back and working.
    Can anyone explain why my Mac behaved the way it did in reponse to creating the RAM disk, and why the floppy was the only solution to get it back up and running?
    No mac expert (or those claiming to be experts) have been able to explain why the Mac behaved like this.
    John

    John
    You mentioned 136MB of physical(?) RAM in the Performa, and OS 9.1 (about 55MB needed), but not the size of the RAM Disk. Was VM enabled also, and how much? RAM Disk allocation is part of the System reservation of RAM (which you can see in About This Computer after restarting). If the RAM were in excess of 80MB (I know. I know. But I have used RAM Disks as big as 300MB on my 9500, which has 1GB of RAM.) the System might not have been able to shoehorn itself in at System heap allocation time. Why no message? Possibly because the system (Start Manager and friends) hadn't reached a point where they had voices. The foregoing all happens at system test time, long before OS load time.
    It is also odd that resetting PRAM did not abolish the RAM Disk, unless your backup battery is failing (at 3.3V or less in circuit). Shut Down of desktop machines is usually preceded by the warning that the contents of a RAM Disk will be lost, even though the memory allocation will be made again at the next startup. 'Persistent RAM Disk' is usually available only in PBs—which save the RAM Disk's contents to the HDD, and reload them to the RAM Disk's memory plot at Startup—for good reason. Your eventual solution perhaps holds a key, ie corrupt (and bizarrely so) Memory Preferences.
    Disk Tools floppies are sometimes worth their weight in any scarce commodity that you may wish to name. Only last night I was saved by the floppy for System 7.5.3 after I had unthinkingly put a pure PPC extension into the 7.5.5 System folder on my IIci. The Mac would not find its HDD, to boot from, or to mount it when I tried to boot from a 7.5.3 CD or an external HDD with 7.6.1. When I had trashed the extension, all was sweetness and light again. Floppies one. Christians nil.

  • Can anyone explain this Calendar beheaviour?

    This is my code
    public static void main(String[] args) {
    Calendar checkDate = Calendar.getInstance();
    System.out.println(checkDate.getTime());
    checkDate.set(Calendar.HOUR, 23);
    System.out.println(checkDate.getTime());
    checkDate.set(Calendar.MINUTE, 59);
    System.out.println(checkDate.getTime());
    checkDate.set(Calendar.SECOND, 59);
    System.out.println(checkDate.getTime());
    checkDate.set(Calendar.MILLISECOND, 0);
    System.out.println(checkDate.getTime());
    checkDate.set(Calendar.DAY_OF_MONTH, 1);
    System.out.println(checkDate.getTime());
    checkDate.add(Calendar.DAY_OF_MONTH, -1);
    System.out.println(checkDate.getTime());
    System.out.println("---------------------------------");
    Calendar checkDate2 = Calendar.getInstance();
    checkDate2.set(Calendar.HOUR, 23);
    checkDate2.set(Calendar.MINUTE, 59);
    checkDate2.set(Calendar.SECOND, 59);
    checkDate2.set(Calendar.MILLISECOND, 0);
    checkDate2.set(Calendar.DAY_OF_MONTH, 1);
    checkDate2.add(Calendar.DAY_OF_MONTH, -1);
    System.out.println(checkDate2.getTime());
    So i'm basically doing twice the same, but the second time without the sysouts.
    But the output is:
    Thu Nov 08 18:18:43 CET 2007
    Fri Nov 09 11:18:43 CET 2007
    Fri Nov 09 11:59:43 CET 2007
    Fri Nov 09 11:59:59 CET 2007
    Fri Nov 09 11:59:59 CET 2007
    Thu Nov 01 11:59:59 CET 2007
    Wed Oct 31 11:59:59 CET 2007
    Thu Nov 01 11:59:59 CET 2007
    Can anyone explain me how this is possible?

    Cinnam wrote:
    practissum wrote:
    Here we go - use HOUR_OF_DAY instead of HOUR. I have no idea why, but this seems to work. Anyone out there have any ideas?Yes, that does the trick. My explanation would be that HOUR is used for 12 hour cycle, HOUR_OF_DAY is for 24 hour cycle. The calendar is in lenient mode because it didn't throw an exception when the OP was HOUR with the value 23. That means it will accept the value 23 and will recompute the other fields - it will basically set the hour to 11 and then add 12 hours. I guess the fields don't get recomputed if some get() isn't called, which is why the System.out.println() makes a difference.Ahh, that would make a lot of sense. I'll accept it as a valid answer/explanation. But, of course, I suppose the only person who has to do that is the OP...
    Anyhow, from my perspective, thanks!

Maybe you are looking for