Skip to main content
Known Participant
September 23, 2008
Question

Oracle Inserted Value too Large for Column

  • September 23, 2008
  • 2 replies
  • 1698 views
This is so annoying and it is happening as I have:

task_id type varchar2(40 bytes) and I am inserting the following: '5996' in it.

The first time when I click the insert button, it works fine, the next time, it gives the above error. The table already has data in it but this is weired.

Please advise.
ISM
This topic has been closed for replies.

2 replies

Inspiring
September 23, 2008
Does your error information show any sql?
ismAuthor
Known Participant
September 23, 2008
It shows the line where the insert statement is taking place. When I changed the varchar2 from 40 bytes to 2000 bytes, the error disappaered but then it inserted the task id as such in the column ( 5996).
Not sure why it put spaces before the inserted number so I went back and put it as 40 bytes. Not sure why..

very strange. by the way i am using oracle sql developer as a tool.

ISM
Inspiring
September 23, 2008
ism wrote:
> It shows the line where the insert statement is taking place. When I changed
> the varchar2 from 40 bytes to 2000 bytes, the error disappaered but then it
> inserted the task id as such in the column (
> 5996).
> Not sure why it put spaces before the inserted number so I went back and put
> it as 40 bytes. Not sure why..
>
> very strange. by the way i am using oracle sql developer as a tool.
>
> ISM
>

Not sure where that space is coming from, there are many possibilities.

But that is why the invented the trim():CF OR rTrim()|lTrim():Oracle
functions.

Participating Frequently
September 23, 2008
quote:

The first time when I click the insert button, it works fine, the next time, it gives the above error. The table already has data in it but this is weired.
So, are you doing an update or an insert? You didn't supply any code, so it is anyone's guess what it is that you are doing......

Phil
ismAuthor
Known Participant
September 23, 2008
Sure. Sorry. Here is how it works. The employee submits a request, a task id is created in the table named INBOX and an email is sent to the supervisor containing this task id (5996) and the supervsior username is inserted along with it in the username column. When the supervisor approves it, this task id (5996) is deleted from the table INBOX to indicate that the supervisor approved it and a new record with same task id (5996) is insterted for the next step which is the manager to approve it and the manager username is inserted along with it in the username column. when the manager approves, the error occurs and is gives this message. The table already has data in it for other workflows types. Our client has requested when we go live to start with task id 5000.

Advise is apprecited.
ISM