- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsI am developing an Access application with Accesss as the front end and SQL Server as the
backend database.
I have an existing table named tblMutualFunds comprised of the following fields:
MutualID int 4 (Identity)
State nvarchar (2)
Account nvarchar (9)
I also have an Excel file that one of my users created with the fields ResStateCode and Plan.
I use the TransferSpreadsheet command to Import the Excel file into an Access table named tblAppend.
My goal is to append the records from the imported Access table tblAppend into the table named tblMutualFunds.
I noticed that when the tblAppend table gets created, the fields generated are defined as follows:
ResStateCode nvarchar(255)
[Plan #] float (8)
field ResStateCode of tblAppend correlates to field State on the table tblMutualFund
field [Plan #] of tblAppend correlates to field Account on the table tblMutualFund
When I try to perform the following
insert into dbo.tblMutualFunds
select ResStateCode, [Plan #]
from dbo.tblMuFunds
I get the error message:
Server: Msg 8115, Level 16, State 2, Line 27
Arithmetic overflow error converting expression to data type nvarchar.
The statement has been terminated.
The problem seems to be that the field [Plan #] gets converted from Excel into a Float field.
Now I am trying to insert values from table tblAppend for field Plan of type float
into a field Account of type nvarchar in table tblMutualFunds.
Do you know how I can fix this conversion problem ?
--------------------------
I was going to try to Alter the table tblMuFunds and alter the column [Plan #] to type nvarchar but I get the following error:
alter table dbo.tblMuFunds
alter column [Plan #] nvarchar not null
Server: Msg 8115, Level 16, State 2, Line 1
Arithmetic overflow error converting expression to data type nvarchar.
The statement has been terminated.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: angelIIIPosted on 2007-04-02 at 22:27:08ID: 18841419
I would first convert from float to decimal, int or bigint (depends on the data), and in a second step to nvarchar.
you might need to create another column with the intermediate data first...