Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert ino 'Getting error'

Status
Not open for further replies.

syncdba

IS-IT--Management
Nov 28, 2005
206
US
Hi,
I'm working on Oracle 8i. I have created a table(Mapping_Currency) & trying to insert the values from another table Currency as

insert into mapping_currencies (currency,short_name)
select currency,alphanumericcode from currency.
I'm getting error:
ORA-01401: Inserted value to large for the Column.

I have changed Currency char(40) & Short_name varchar2(100).
Please let me know where I' wrong.


 
Currency Table
--------------
Currency Varchar2(90)
Alphanumericcode Varchar2(25)

Mapping_Currency
-----------------
Currency Char (40)
short_names 2(100)


 
Potentially, CURRENCY.CURRENCY is 50 characters larger than the target column MAPPING_CURRENCY.CURRENCY. To identify how many rows are disobeying the length limitation, you can issue this query:
Code:
select count(*) from currency
where length(currency)>40;
If the results exceed 0, then you must either substring only the first 40 characters from currency.currency, or expand the maximum length of MAPPING_CURRENCY.currency to a length >= the max(length(currency.currency)).

Also, what benefit do you expect from using a fixed-length column specification for MAPPING_CURRENCY.CURRENCY?


[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top