Not able to compare varchar filed with number

tag3 is varchar filed can have number data
Below works good
comparison with 0 or 1 works also less than or equal operator works
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)<=24
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)=0
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)=1
>
greater or equal comparison doesn't work
doesn't work
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)>=24
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)=2
any number beyond 1 doesn't work
Error :ORA-01722: invalid number
01722. 00000 - "invalid number"
*Cause:   
*Action:
Not able to understand the logic of comparing the number with
same is tried with TO_NUMBER as well
works good
select I.* from ob_release_instruction I where to_number(i.tag3) > 0
Not working ( changed the value to more than 0)
select I.* from ob_release_instruction I where to_number(i.tag3) > to_number('24')
Not working
select I.* from ob_release_instruction I where to_number(i.tag3) > 24
Above two query is not working throwing below error
ORA-01722: invalid number
01722. 00000 - "invalid number"
*Cause:   
*Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Here is the sample
tag3 is varchar filed can have number data
TAG3 VARCHAR2(30 CHAR)
column has few nulll, alpha numeric and number values
I want to check entered number is greater than 24 or not
Below works good
comparison with 0 or 1 works also less than or equal operator works
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)<=24
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)=0
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)=1
greater or equal comparison doesn't work
doesn't work
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)>=24
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)=2
select TAG3 from ob_release_instruction i WHERE CAST(i.tag3 as NUMBER)>2
any number beyond 1 doesn't work
Error :ORA-01722: invalid number
01722. 00000 - "invalid number"
*Cause:
*Action:
Not able to understand the logic of comparing the number with
same is tried with TO_NUMBER as well
works good
select I.* from ob_release_instruction I where to_number(i.tag3) > 0
Not working ( changed the value to more than 0)
select I.* from ob_release_instruction I where to_number(i.tag3) > to_number('24')
Not working
select I.* from ob_release_instruction I where to_number(i.tag3) > 24
Above two query is not working throwing below error
ORA-01722: invalid number
01722. 00000 - "invalid number"
*Cause:
*Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • 2nd Try: Please Help : UIX : Not able to use messageFileUpload along with m

    UIX : Not able to use messageFileUpload along with messageChoice
    I used messageFileUpload UIX element and associated upload button to fileupload servlet. This servlet just captures the file and put it in desired location. This works just fine.
    My client wanted me to add another choice filed on UI. I used messageChoice. I named the field as fileType. All the options have name and value populated but when I submit the form servlet is reading fileType as NULL.
    I am not sure what's happening. Please let me know how should I send file handle as well fileType ?
    Thanks,
    Linda

    What exactly are you expecting this to do for you?
    Forall is designed to process batches of DML to prevent context switching from PL/SQL to SQL.
    Has no relevance for what you are trying to do.
    If you don't want to call the procedure multiple times, you need to rewrite it to passs the cursor to the function, then have the function process all the records.
    Carl

  • Not able to make any call with my lumia 710

    Not able to make any call with my lumia 710 though other then call everything is working fine. I chacked my SIM in other phone, i there phone i can make calls. Whats wrong with my phone?

    hi
    i am using nokia lumia since last 6 months. i am having aitel connection. till few days back i was able to make phone calls however now phone calls are immediately getting ended.  i m able to send sms, receive calls and use intenel..problem presisits only with receiving call..
    suggest me a way out..plz..

  • Not able to convert string attribute to number and date please help me out

    not able to convert string attribute to number and date attribute. While using string to date conversion it shows result as failure.As I am reading from a text file. please help me out

    Hi,
    You need to provide an example value that's failing and the date formats in the reference data you're using. It's more than likely you don't have the correct format in your ref data.
    regards,
    Nick

  • I'm not able to access goolge docs with the blackberry browser (it worked fine till a few weeks ago)

    I'm not able to access google docs with the blackberry browser (it worked fine till a few weeks ago)
    seems that this issue happens to a lot of people
    is google going head to head with Blackberry ? or is this just a bug ? 
    Message Edited by avolcoff on 08-27-2009 01:06 AM

    Welcme to the cmmunity supprt frums
    Nurse-Berry
    Follow NurseBerry08 on Twitter

  • [HP Expert Day] "You are not able to restore this system with the media"

    Welcome to HP Experts day! 
    I've got a long-standing problem since last year. Let's see if you can solve this! 
     I'll get straight to the point : 
    I am unable to perform recovery on my system. This is the error message : 
    It's a USB recovery media created with the HP recovery media utility on the same laptop. Tested to work correctly before I sent it for RMA on my SSD. It initially was running on a micron SSD. When I got it back, it was a samsung SSD instead, according to some benchmark results. 
    Laptop : HP Envy Spectre XT 13-2018TU
    P.S I've already opened another thread on this last year. 
    http://h30434.www3.hp.com/t5/Notebook-Recovery/Unable-to-boot-from-USB-recovery-media/m-p/2197929#M1... 
    But they were stumped. 

    I had this exact same issue on a Spectre XT Pro Ultrabook. 
    The original SSD failed and I was sent a replacement, was fortunate enough to be able to create a Recovery USB stick using the wizard in Windows. When booting from USB I received the message "You are not able to restore this system with the media".
    SOLUTION: You must NOT use the Recovery USB stick in any USB3.0 port (labelled SS). Using another USB port prevented this exact error message from appearing and I was able to complete the system restore process.
    I hope this helps someone, I signed up and posted here especially for this reason!

  • Not able to import the article with sidecar.xml

    Hi,
    With the new DPS version (ver. 18), we are not able to import the article with sidecar.xml. Could you please check and suggest the solution for the same.
    With Regards,
    Anil Yadav

    I read that your sidecar needs the author-value to be working.
    —Johannes
    (mobil gesendet)
    Am 30.01.2012 07:54 schrieb "Anil Yadav" <[email protected]>:
       not able to import the article with sidecar.xml  created by Anil Yadav<http://forums.adobe.com/people/Anil+Yadav>in
    Digital Publishing Suite - View the full discussion<http://forums.adobe.com/message/4173103#4173103>

  • Hi, i installed d latest version of itunes on my pc, but still am not able to connect my iPhone with that...

    hi, i installed the latest version of itune on my pc, but still i am not able to connect my iPhone with my pc....

    The top window says Accessing iTunes Store and the animation underneath will
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • I am Using Apple iPhone 4g 32gb and i have Updated to iOS 6.0 but in Maps i am not able to change the angle with two finger why so ?

    I am Using Apple iPhone 4g 32gb and i have Updated to iOS 6.0 but in Maps i am not able to change the angle with two finger why so ? I have also restored it but not getting

    I have an iPhone 4 also.  If you are referring to the flyover view, its unavailble for the iPhone4.  If you want to rotate the map, hold two fingers on the map for 2-3 seconds and rotate them in opposite directions.
    Hope this helps

  • Not able to compare PL/SQL body from two different offline database object

    It is not possible to compare two package bodies from two different off line database object in two different off line database and schema.
    JDeveloper display a compare not available message in the middle of the window.
    It is possible to compare the package specification.

    Not able to compare scripts generated from offline database objects too

  • HT1386 Since 8th May , I am not able to synchronize my iPhone with iTunes. Have tried removing previous back up data , removed all photos and videos on iPhone , switched  on and of and  reset iPhone  a million times , restarted my Mac a thousand times :(

    Since 8th May , after updating the iphone software to 5.1.1  I am not able to synchronize my iPhone with iTunes. Have tried removing previous back up datas , removed all photos and videos on iPhone , switched  on and of and  reset iPhone  a million times , restarted my Mac a thousand times Please Help !!!

    I have tried both options .. back up on this computer and also back up on icloud.
    The backingup is fine .. there is no problem .. even synchronizing songs , applications , calender , mail accounts is fine .. only the contacs are not synchronizing. The itune goes on and on .. showing synchronizing contacs .. but nothing happens. When i uncheck contacts synchronisation .. everything works fine . I have also reorganized my address book . but it does not help

  • Not able to open any doc with adobe reader XI. fatal error, acrobat failed to its core DLL load

    not able to open any doc with adobe reader XI. fatal error, acrobat failed to its core DLL load

    See http://helpx.adobe.com/acrobat/kb/reader-core-dll-error.html

  • HT1420 i am not able to authorised my mac with iPad

    i am not able to authorised my mac with ipad

    What happens when you try to authorise your account on your computer's iTunes ? You should be able to do so via the Store drop-down menu at the top of iTunes :
    If your iPad hasn't been synced to that computer before then you may also find this page for syncing to a new computer useful : https://discussions.apple.com/docs/DOC-3141

  • Not able to find Portal Combo with Stoplight in top right corner

    We are running on EP7.0 SP8. VC is also in SP8. After installing, I am not able to see PORTAL combo with the stoplight in the top right corner of VC. Any Help ?
    Regards,
    Murali

    Hi
    Actaully, in this version, I believe that we would not be getting the PORTAL url at top right corner. In my Quality server, it works fine.
    In my Development Server, when i click on 'Find Data' icon, it throws me the following error.
    0001> Welcome to Visual Composer
    0002> Portal Connector: fetch error: Bad or missing XML object
    0003> Parse of result error :Bad or missing XML object
    Any Help.
    Regards,
    Murali.

  • Not able to call on any mobile number even credit ...

    not able to call on any mobile number even credit is there in account 

    Hi,
    Please check your usage call history on your Skype web account page to learn why the calls failed: www.skype.com/go/myaccount
    Follow the latest Skype Community News
    ↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓

Maybe you are looking for