Home » Developer & Programmer » Precompilers, OCI & OCCI » How to insert character value into number field?
How to insert character value into number field? [message #329667] Thu, 26 June 2008 03:10 Go to next message
Akash Nathile
Messages: 38
Registered: October 2006
Location: Pune
Member
Hi,

Can anybody tell me how to insert character value into number field?

As I have one procedure whose input is Varray as character datatype.
Now i want to insert this Varray value which is comma seperated into table whose field is number.

This is not possible to change table number datatype into varchar2 as its master table and its a primary key field with lots of indexes on it.
Re: How to insert character value into number field? [message #329720 is a reply to message #329667] Thu, 26 June 2008 05:45 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Can anybody tell me how to insert character value into number field?

It is not possible, numbers are not string, numbers don't contain character.

Your requirement are not clear, post an example.

Regards
Michel
Re: How to insert character value into number field? [message #329724 is a reply to message #329720] Thu, 26 June 2008 06:08 Go to previous messageGo to next message
Akash Nathile
Messages: 38
Registered: October 2006
Location: Pune
Member
Hi Michel,

I enclosed script with mail .

I want to insert into table without "Execute immediate" as per my requirement.

I think where clause of select query is giving me problem....


" WHERE pmt.payment_id IN ('||V_PAYMENT_ID||')".


As pmt.payment_id is number field and V_PAYMENT_ID is varchar2.



Thanks in advance.




  • Attachment: TEST_PKG.sql
    (Size: 4.57KB, Downloaded 2266 times)
Re: How to insert character value into number field? [message #329742 is a reply to message #329724] Thu, 26 June 2008 07:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Search for "varying in list" or the like.

Regards
Michel
Re: How to insert character value into number field? [message #329760 is a reply to message #329742] Thu, 26 June 2008 07:42 Go to previous messageGo to next message
Akash Nathile
Messages: 38
Registered: October 2006
Location: Pune
Member
Can you please tell in brief as I am not getting you.

If you are asking me that am I using array then yes I am using Varray and I want to pass value through Varray.
Re: How to insert character value into number field? [message #329766 is a reply to message #329760] Thu, 26 June 2008 07:55 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I'm not asking anything but you to search for the string I posted.
Note: there a "Search" command in menu bar.

You can also search on AskTom for the same.

Regards
Michel
Previous Topic: OCCI and returning cursors
Next Topic: Performance issues for PRO*C script
Goto Forum:
  


Current Time: Thu Apr 18 22:30:53 CDT 2024