473,470 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Oracle error: ORA-01401:inserted value too large for column

68 New Member
hi all. i am having a problem in updating oracle table from asp.net page. the problem as catched from try catch block is:


"ORA-01401: inserted value too large for column\nORA-06512: at \"SANGAM.USERS_PKG\", line 106\nORA-01403: no data found\nORA-06512: at line 1"

I wandered a lot but could not find the solution. Any help would is appreciated.
Sep 8 '08 #1
4 8475
r035198x
13,262 MVP
What are the column defintions and the datatypes and values that you want to insert into the column?
Sep 8 '08 #2
sangam56
68 New Member
The table definition is:

CREATE TABLE ASSET
(
COMPANY_ID VARCHAR2(150) NOT NULL,
ASSET_ID VARCHAR2(150) NOT NULL,
ASSET_NAME VARCHAR2(150) NOT NULL,
PARENT_ID VARCHAR2(150),
WD_RATE NUMBER(2) NOT NULL,
SL_RATE NUMBER(2) NOT NULL,
IS_GROUP VARCHAR2(1) NOT NULL,
MODEL_NUMBER VARCHAR2(150),
ADDED_BY VARCHAR2(50) NOT NULL,
ADDED_DATE DATE NOT NULL,
UPDATED_BY VARCHAR2(50) NOT NULL,
UPDATED_DATE DATE NOT NULL
)
I have trimmed all constraints in this code.

I am using a procedure in a package to insert data into this table.

-- Inserts a new record into the 'ASSET' table.
PROCEDURE ASSET_Insert
(
i_COMPANY_ID VARCHAR2,
i_ASSET_ID VARCHAR2,
i_ASSET_NAME VARCHAR2,
i_PARENT_ID VARCHAR2,
i_WD_RATE NUMBER,
i_SL_RATE NUMBER,
i_IS_GROUP VARCHAR2,
i_MODEL_NUMBER VARCHAR2,
i_ADDED_BY VARCHAR2,
i_ADDED_DATE DATE,
o_Error out VARCHAR2
)
AS
find VARCHAR2(1);
curDate date;
BEGIN
SELECT 'X' INTO find FROM ASSET WHERE COMPANY_ID=i_COMPANY_ID AND ASSET_ID=i_ASSET_ID AND PARENT_ID=i_PARENT_ID;
o_Error:='The asset id already exists in the selected parent. Please give some other asset id';

exception when no_data_found then

INSERT INTO SANGAM.ASSET
(
COMPANY_ID,
ASSET_ID,
ASSET_NAME,
PARENT_ID,
WD_RATE,
SL_RATE,
IS_GROUP,
MODEL_NUMBER,
ADDED_BY,
ADDED_DATE
)
VALUES
(
i_COMPANY_ID,
i_ASSET_ID,
i_ASSET_NAME,
i_PARENT_ID,
i_WD_RATE,
i_SL_RATE,
i_IS_GROUP,
i_MODEL_NUMBER,
i_ADDED_BY,
i_ADDED_DATE DATE
);
END;
Sep 9 '08 #3
amitpatel66
2,367 Recognized Expert Top Contributor
Change the procedure to insert data row by row and if data incorrect then insert taht record in to log table in exception block
Sep 9 '08 #4
sangam56
68 New Member
Yes. Thanks amit patel. While checking row by row i came to know my mistake. I had mistaken Precision of the SLRate and WDRate column for Scale.
I later knew that I was just opposite for the concept. Precision means upto how many digits i can store and scale means the no of places after decimal. Thanks.
Sep 11 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dirk Försterling | last post by:
Hi all, a few days ago, I upgraded from PostgreSQL 7.2.1 to 7.4, following the instructions in the INSTALL file, including dump and restore. All this worked fine without any error (message). ...
1
by: David C. allen | last post by:
I have created a simple Client-side SOAP Extension for a webclass that I have. When I apply the extension attribute to the the calling function in the proxy class I get an error 'Value cannot be...
2
by: Iker Arizmendi | last post by:
Using psql and running as the owner of the table "app" I try to access the columns of the table like so: SELECT * FROM app; which returns all the columns in the table including the one I'm...
1
by: Sandro Daehler | last post by:
Hy i have a problem with the following statement: SELECT MAX(id) FROM apconfig; if i send this statement i got the following error: ERROR: column "id" does not exist
2
by: XML newbie: Urgent pls help! | last post by:
Hi, I am getting the error: Value of type 'String' cannot be converted to '1-dimensional array of Long'. in the following line for TextBox2.Text field : ...
0
by: XML newbie: Urgent pls help! | last post by:
Hi, I am getting the error: Value of type 'String' cannot be converted to '1-dimensional array of Long'. in the following line for TextBox2.Text field : ...
6
by: half.italian | last post by:
Hi all, I'm using ftplib to transfer large files to remote sites. The process seems to work perfectly with small files, but when the file gets to large ~20GB I begin getting errors that...
6
by: crs27 | last post by:
Hai, Im getting this error.There is a column by name "nr_first_name" in the table "gistl_new_request". Yet im getting as that dose not exist.Would like to now what is the cause of it. ...
1
by: Shikha1234 | last post by:
Hi, I have a database which has a primary key field (integer). It should be autogenerated on every insert statement. I am hardcoding it everytime to remove the error that the data supplied is...
0
by: remya1000 | last post by:
i'm using VB.Net 2005 application program. i'm trying to convert VB6 code to VB.Net 2005. QSockB is DLL file. this is the code i used for VB6. This is code i'm using to create socket, when...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.