Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:26:18+00:00 2026-06-10T05:26:18+00:00

This particular function that checks if a string is a number is throwing an

  • 0

This particular function that checks if a string is a number is throwing an exception when i pass in 1.00 :

create or replace function my_to_number( p_num in 
varchar2 ) return number
   as
      x number;
       num_val_error exception;
       pragma exception_init( num_val_error, -6502 );
 begin
       x := to_number( p_num );
         return 1;
  exception
         when num_val_error then 
         return 0;
  end my_to_number;

1.00 is a perfectly valid number. Right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:26:20+00:00Added an answer on June 10, 2026 at 5:26 am

    TO_NUMBER takes up to three parameters, the first is the expression to convert, the second is the number format to use, and the third defines what the decimal and group separators are. Only the first is required. Without the third nlsparam element, Oracle uses the default for your session. It looks like the default decimal separator for your locale is ‘,’.

    Try TO_NUMBER(p_num, '9G999D99', 'NLS_NUMERIC_CHARACTERS = ''.,''')

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this functions for load configuration for particular extension function! LoadSnippets(extension) let file
I am looking to scroll the page to a particular location.Something like this: function
Is there any function that I can use to parse any string to ensure
I have a function that checks the age of a form submission and then
Here's what I'm trying to accomplish with this program: a recursive method that checks
My requirement is to match tags. In the example, this particular HourConstraint checks the
I have a particular function which checks if a particular row matches the query
I have a function that checks each cell in each row of a table
I want to find particular string in JAVA and I am using CONTAINS function
I have a function that returns an 8 digit long binary string for given

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.