Home » SQL & PL/SQL » SQL & PL/SQL » getting ORA-01438 error (field presion) on update from fields of the same presision
getting ORA-01438 error (field presion) on update from fields of the same presision [message #327249] Sun, 15 June 2008 12:26 Go to next message
dan_thorman
Messages: 14
Registered: January 2007
Junior Member
hi.

I am running an update statement that is updating a field in a table from a field in a view. BOTH FIELDS are defined as number(6). however, when i try to set field a equal to field b, i get this error: ORA-01438: value larger than specified precision allowed for this column

the fields are defined as below:

table a:
prop_id number (6)
prop2_id number (6)

VIEW b:
prop_id number(6)
prop2_id number (6)

i fail on this:
update a
set a.prop2_id = (select b.prop2_id from b where b.prop_id = a.prop_id)

suggestions?
Re: getting ORA-01438 error (field presion) on update from fields of the same presision [message #327253 is a reply to message #327249] Sun, 15 June 2008 13:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64108
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Prove what you said.
Use SQL*PLus, copy and paste your session.

Before please read OraFAQ Forum Guide, especially "How to format your post?" section, use code tags.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter).
Use the "Preview Message" button to verify.

Regards
Michel
Re: getting ORA-01438 error (field presion) on update from fields of the same presision [message #327259 is a reply to message #327253] Sun, 15 June 2008 15:00 Go to previous message
dan_thorman
Messages: 14
Registered: January 2007
Junior Member
after several hours of brain-wracking, i came across a solution. the view was grabbing a max(value) from a subquery. i have no idea why it worked, but when i did max(to_number(value)) i was able to join that successfully.
Previous Topic: Trigger Problem
Next Topic: Bitmap Index
Goto Forum:
  


Current Time: Mon Dec 05 05:11:24 CST 2016

Total time taken to generate the page: 0.19447 seconds