Home » SQL & PL/SQL » SQL & PL/SQL » calling a package: Invalid Number error
calling a package: Invalid Number error [message #468679] Sun, 01 August 2010 06:18 Go to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
i am trying to pass below date value but i get below error

ORA 01722 inavlid number

Database driver error...
CMN_1022 [CALL EDWH.IIC_PACKAGE.POST_IIC_CON(TO_DATE('07/31/2010', 'MM/DD/YYYY'))

ORA-01722: invalid number

[EDITED by LF: fixed topic title typo; the original was "apckage"]

[Updated on: Mon, 02 August 2010 04:12] by Moderator

Report message to a moderator

Re: calling a apckage Invalid Number error [message #468682 is a reply to message #468679] Sun, 01 August 2010 06:47 Go to previous messageGo to next message
Michel Cadot
Messages: 68757
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Use SQL*PLus and call the same package and copy and paste your session as well as your package code with the line numbers.

Regards
Michel
Re: calling a PACKAGE Invalid Number error [message #468683 is a reply to message #468679] Sun, 01 August 2010 06:59 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
THIS IS THE ERROR MESSAGE FROM THE LOG FILE

AM USING A CLIENT TOOL FOR EXTRACING DATA AND IT IS GIVING ME THE ERROR FOR ORACLE.

any ideas on this.
i checked the oracle error codes and it says
An ORA-01722 error occurs when an attempt is made to convert a character string into a number, and the string cannot be converted into a valid number. Valid numbers contain the digits '0' thru '9', with possibly one decimal point, a sign (+ or -) at the beginning or end of the string, or an 'E' or 'e' (if it is a floating point number in scientific notation). All other characters are forbidden.

[Updated on: Sun, 01 August 2010 08:42]

Report message to a moderator

Re: calling a apckage Invalid Number error [message #468686 is a reply to message #468679] Sun, 01 August 2010 08:47 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
Attached is the snaphsot of the package execution

please guide
  • Attachment: package.PNG
    (Size: 41.74KB, Downloaded 510 times)

[Updated on: Sun, 01 August 2010 08:50]

Report message to a moderator

Re: calling a apckage Invalid Number error [message #468687 is a reply to message #468686] Sun, 01 August 2010 09:15 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

I can not debug code I can not see

[Updated on: Sun, 01 August 2010 09:17]

Report message to a moderator

Re: calling a apckage Invalid Number error [message #468688 is a reply to message #468687] Sun, 01 August 2010 09:50 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
My Apologies for the mistakes .
i will take care of them in future
Re: calling a apckage Invalid Number error [message #468689 is a reply to message #468688] Sun, 01 August 2010 09:52 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>i will take care of them in future
I will answer in the future.
Re: calling a apckage Invalid Number error [message #468697 is a reply to message #468688] Sun, 01 August 2010 12:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68757
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
avrillavinge wrote on Sun, 01 August 2010 16:50
My Apologies for the mistakes .
i will take care of them in future

As you say the same thing after 86 posts, I doubt you will do it but anyway I will help as soons as I'll se that.

In the meantime:

Quote:
Use SQL*PLus and call the same package and copy and paste your session as well as your package code with the line numbers.


Regards
Michel

[Updated on: Sun, 01 August 2010 12:12]

Report message to a moderator

Re: calling a apckage Invalid Number error [message #468733 is a reply to message #468697] Sun, 01 August 2010 23:06 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
ORA-01722: invalid number 

Cause: The attempted conversion of a character string to a number failed because 
the character string was not a valid numeric literal. Only numeric fields or character 
fields containing numeric data may be used in arithmetic functions or expressions. 
Only numeric fields may be added to or subtracted from dates. 

Action: Check the character strings in the function or expression. 
Check that they contain only numbers, a sign, a decimal point, and the 
character "E" or "e" and retry the operation.  

Re: calling a apckage Invalid Number error [message #468737 is a reply to message #468733] Mon, 02 August 2010 00:07 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
avrillavinge already clearly stated to have found this him/herself.
Re: calling a apckage Invalid Number error [message #468744 is a reply to message #468737] Mon, 02 August 2010 00:51 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
In that case avrillavinge is requested to Post code in forum. Smile

[Updated on: Mon, 02 August 2010 00:51]

Report message to a moderator

Re: calling a apckage Invalid Number error [message #468745 is a reply to message #468744] Mon, 02 August 2010 00:55 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Quote:
Quote:
Use SQL*PLus and call the same package and copy and paste your session as well as your package code with the line numbers.

Regards
Michel



So let`s wait...
sriram
Re: calling a apckage Invalid Number error [message #468746 is a reply to message #468745] Mon, 02 August 2010 00:56 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
Ok. Smile
Re: calling a apckage Invalid Number error [message #468770 is a reply to message #468679] Mon, 02 August 2010 02:46 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
Attached is the code and the entire package

i get issue at line 1452 as per the error above
Re: calling a apckage Invalid Number error [message #468773 is a reply to message #468770] Mon, 02 August 2010 03:04 Go to previous messageGo to next message
Michel Cadot
Messages: 68757
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Michel Cadot wrote on Sun, 01 August 2010 19:12
.
Quote:
Use SQL*PLus and call the same package and copy and paste your session as well as your package code with the line numbers.


Regards
Michel


Re: calling a apckage Invalid Number error [message #468774 is a reply to message #468773] Mon, 02 August 2010 03:22 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
i do not have SQL *Plus .sorry for the inconvinience

i m using pl sql developer.

any other suggestions are appreciated
Re: calling a apckage Invalid Number error [message #468776 is a reply to message #468774] Mon, 02 August 2010 03:37 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
With limited details

Your Main ASSIGN_LEAF Signature.
  PROCEDURE ASSIGN_LEAF(P_SYS_ID_NUM NUMBER,
                        P_NEW_PARENT NUMBER,
                        P_LEAF_NODE  NUMBER,
                        P_EXCEPTION  NUMBER);



At line 1452 you have


          ASSIGN_LEAF(HIER_REC.SYS_ID_NUM,
                        NODE_REC.ROLLUP_NODE,
                        LEAF_REC.LEAF_NODE,
                        0);



So Just try Following

          ASSIGN_LEAF(  TO_NUMBER(HIER_REC.SYS_ID_NUM),
                        TO_NUMBER(NODE_REC.ROLLUP_NODE),
                        TO_NUMBER(LEAF_REC.LEAF_NODE),
                        0);


This is just A TRY. and you might want to print all the values before passing ASSIGN_LEAF.

[Updated on: Mon, 02 August 2010 03:42]

Report message to a moderator

Re: calling a apckage Invalid Number error [message #468783 is a reply to message #468774] Mon, 02 August 2010 03:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68757
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
i do not have SQL *Plus .

So install it, it is a basis to post your problem and show us what we can't reproduce in our place.

Regards
Michel
Re: calling a apckage Invalid Number error [message #468784 is a reply to message #468776] Mon, 02 August 2010 03:57 Go to previous messageGo to next message
ThomasG
Messages: 3212
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
That is at around line 1452 in the FILE, which is almost definitely not in or around line 1452 in the created procedure.

To find the "real" line with the problem avrillavinge would have to post the package with the REAL line numbers from user_source, but he doesn't seem to want to.
Re: calling a apckage Invalid Number error [message #468789 is a reply to message #468776] Mon, 02 August 2010 04:01 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
since this is a variable..its the same

when i put actual avlue it works fine but through the variable i get the inavlid number error.

strange part is same package works in UAT and doesnt on production
Re: calling a apckage Invalid Number error [message #468790 is a reply to message #468789] Mon, 02 August 2010 04:01 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
Thnaks for your help rahul lets see if we can find other workaround
Re: calling a apckage Invalid Number error [message #468792 is a reply to message #468790] Mon, 02 August 2010 04:02 Go to previous messageGo to next message
avrillavinge
Messages: 98
Registered: July 2007
Member
i sahll try with sql * plus form somewhere and try top post with line numbers as suggested
Re: calling a apckage Invalid Number error [message #468796 is a reply to message #468792] Mon, 02 August 2010 04:04 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Good and next time please Use "spell check " before posting so many typos in your post

sriram

[Updated on: Tue, 03 August 2010 06:13]

Report message to a moderator

Re: calling a apckage Invalid Number error [message #469010 is a reply to message #468796] Tue, 03 August 2010 00:20 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
ramoradba wrote on Mon, 02 August 2010 11:04
Good and next time please Use "spell check " before posting so many typos in your post

sriram

... of which only one would have been caught by a spell-checker..
Re: calling a apckage Invalid Number error [message #469012 is a reply to message #468792] Tue, 03 August 2010 00:24 Go to previous messageGo to next message
rahulvb
Messages: 924
Registered: October 2009
Location: Somewhere Near Equator.
Senior Member
avrillavinge wrote on Mon, 02 August 2010 04:02
i sahll try with sql * plus form somewhere and try top post with line numbers as suggested


sahll Should be Shall but it not Caught by Spell-Checker Smile
Re: calling a package Invalid Number error [message #469106 is a reply to message #469012] Tue, 03 August 2010 06:20 Go to previous message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
rahulvb wrote on Tue, 03 August 2010 10:54

sahll Should be Shall but it not Caught by Spell-Checker


/forum/fa/8124/0/

Hope this will end the irrelevant discussion...
Lets wait for OP response


sriram
Previous Topic: cannot create matterialize view
Next Topic: How to select a name starting with first letter caps
Goto Forum:
  


Current Time: Fri May 16 14:14:52 CDT 2025