Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Arithmetic overflow error converting numeric to data type ..

 
   Database Help (Home) -> Datamining RSS
Next:  Collecting data from multiple tables into one  
Author Message
Richard Morey

External


Since: Jan 21, 2004
Posts: 17



(Msg. 1) Posted: Thu Dec 11, 2003 1:31 pm
Post subject: Arithmetic overflow error converting numeric to data type nu
Archived from groups: microsoft>public>sqlserver>datamining (more info?)

Hi,

I am trying to move data from an old Access db into SQL 2000.

I have imported the old Access db into SQL and now I am running queries to
move the data from the old tables to the new tables. If I run this
statement:

SELECT CONVERT(NUMERIC,LEFT(GARAGE,3)) AS GARAGECARS FROM OLD_HOUSMAIN


I get all 8025 records and no errors.

If I try to run this statement:

INSERT INTO TABLEHOUSES (GARAGECARS)

SELECT CONVERT(NUMERIC,LEFT(GARAGE,3)) AS GARAGECARS FROM OLD_HOUSMAIN

I get this error:

Arithmetic overflow error converting numeric to data type numeric.

Any ideas why? It seems to me that since the SELECT statement executes on
its own, the insert should as well. I've check and there are no null or
empty strings in the old db..

Thanks

Rich

 >> Stay informed about: Arithmetic overflow error converting numeric to data type .. 
Back to top
Login to vote
Derek Shi

External


Since: Sep 02, 2003
Posts: 6



(Msg. 2) Posted: Fri Dec 12, 2003 2:14 am
Post subject: Arithmetic overflow error converting numeric to data type nu [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It seems to me that the attribute in the table
Tablehouses is not accepting numeric data type. Try
changing the data type of the attribute.

Derek

 >-----Original Message-----
 >Hi,
 >
 >I am trying to move data from an old Access db into SQL
2000.
 >
 >I have imported the old Access db into SQL and now I am
running queries to
 >move the data from the old tables to the new tables. If
I run this
 >statement:
 >
 >SELECT CONVERT(NUMERIC,LEFT(GARAGE,3)) AS GARAGECARS
FROM OLD_HOUSMAIN
 >
 >
 >I get all 8025 records and no errors.
 >
 >If I try to run this statement:
 >
 >INSERT INTO TABLEHOUSES (GARAGECARS)
 >
 >SELECT CONVERT(NUMERIC,LEFT(GARAGE,3)) AS GARAGECARS
FROM OLD_HOUSMAIN
 >
 >I get this error:
 >
 >Arithmetic overflow error converting numeric to data
type numeric.
 >
 >Any ideas why? It seems to me that since the SELECT
statement executes on
 >its own, the insert should as well. I've check and there
are no null or
 >empty strings in the old db..
 >
 >Thanks
 >
 >Rich
 >
 >
 >.
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Arithmetic overflow error converting numeric to data type .. 
Back to top
Login to vote
Richard Morey

External


Since: Jan 21, 2004
Posts: 17



(Msg. 3) Posted: Fri Dec 12, 2003 6:20 pm
Post subject: Re: Arithmetic overflow error converting numeric to data typ [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

But the data type in question is numeric..

Rich

"Derek Shi" <drkshih.DeleteThis@hotmail.com> wrote in message
news:012501c3c07f$8f847cb0$a001280a@phx.gbl...
 > It seems to me that the attribute in the table
 > Tablehouses is not accepting numeric data type. Try
 > changing the data type of the attribute.
 >
 > Derek
 >
  > >-----Original Message-----
  > >Hi,
  > >
  > >I am trying to move data from an old Access db into SQL
 > 2000.
  > >
  > >I have imported the old Access db into SQL and now I am
 > running queries to
  > >move the data from the old tables to the new tables. If
 > I run this
  > >statement:
  > >
  > >SELECT CONVERT(NUMERIC,LEFT(GARAGE,3)) AS GARAGECARS
 > FROM OLD_HOUSMAIN
  > >
  > >
  > >I get all 8025 records and no errors.
  > >
  > >If I try to run this statement:
  > >
  > >INSERT INTO TABLEHOUSES (GARAGECARS)
  > >
  > >SELECT CONVERT(NUMERIC,LEFT(GARAGE,3)) AS GARAGECARS
 > FROM OLD_HOUSMAIN
  > >
  > >I get this error:
  > >
  > >Arithmetic overflow error converting numeric to data
 > type numeric.
  > >
  > >Any ideas why? It seems to me that since the SELECT
 > statement executes on
  > >its own, the insert should as well. I've check and there
 > are no null or
  > >empty strings in the old db..
  > >
  > >Thanks
  > >
  > >Rich
  > >
  > >
  > >.
  > ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Arithmetic overflow error converting numeric to data type .. 
Back to top
Login to vote
Ken H

External


Since: Jan 09, 2004
Posts: 2



(Msg. 4) Posted: Fri Jan 09, 2004 12:48 pm
Post subject: Re: Arithmetic overflow error converting numeric to data typ [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The precision of field "GARAGECARS" is probably less than
necessary to accomodate all values from the conversion in
your select statement. Find the precision and scale of
field "GARAGECARS" and try the select statement again
specifying precision & scale, for example ...

"GARAGECARS" is a NUMERIC(3,1)

Change your query to:

SELECT CONVERT(NUMERIC(3,1),LEFT(GARAGE,3)) AS GARAGECARS
FROM OLD_HOUSMAIN

If that fails then you need to increase the precision
and/or scale of the field.


 >-----Original Message-----
 >But the data type in question is numeric..
 >
 >Rich
 >
 >"Derek Shi" <drkshih.DeleteThis@hotmail.com> wrote in message
 >news:012501c3c07f$8f847cb0$a001280a@phx.gbl...
  >> It seems to me that the attribute in the table
  >> Tablehouses is not accepting numeric data type. Try
  >> changing the data type of the attribute.
  >>
  >> Derek
  >>
   >> >-----Original Message-----
   >> >Hi,
   >> >
   >> >I am trying to move data from an old Access db into SQL
  >> 2000.
   >> >
   >> >I have imported the old Access db into SQL and now I am
  >> running queries to
   >> >move the data from the old tables to the new tables. If
  >> I run this
   >> >statement:
   >> >
   >> >SELECT CONVERT(NUMERIC,LEFT(GARAGE,3)) AS GARAGECARS
  >> FROM OLD_HOUSMAIN
   >> >
   >> >
   >> >I get all 8025 records and no errors.
   >> >
   >> >If I try to run this statement:
   >> >
   >> >INSERT INTO TABLEHOUSES (GARAGECARS)
   >> >
   >> >SELECT CONVERT(NUMERIC,LEFT(GARAGE,3)) AS GARAGECARS
  >> FROM OLD_HOUSMAIN
   >> >
   >> >I get this error:
   >> >
   >> >Arithmetic overflow error converting numeric to data
  >> type numeric.
   >> >
   >> >Any ideas why? It seems to me that since the SELECT
  >> statement executes on
   >> >its own, the insert should as well. I've check and
there
  >> are no null or
   >> >empty strings in the old db..
   >> >
   >> >Thanks
   >> >
   >> >Rich
   >> >
   >> >
   >> >.
   >> >
 >
 >
 >.
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Arithmetic overflow error converting numeric to data type .. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Microsoft.AnalysisServices.Viewers ... Overflow Error - I'm using Microsoft.AnalysisServices.Viewers to display the content of a Microsoft_Linear_Regression model. The viewer blows up with the following error. The error does not appear when I browse it from the Excel 2007 addin, or Visual Studio. Is there a...

ERROR with OPENDUERY - I have given the fallwoing Query INSERT INTO DATA (EmployeeKey,[Title]) OPENQUERY([Adventure Works DW],'Select ([EmployeeKey],[Title] FROM DimEmployee') I got the error like this: Either the 'BOSE\subhash' user does not have permission to..

Scripting data mining - Hi, Can I execute from code refreshing of data and full processing of Mining Model ? And also execute prediction query on this mining model with client input ? Thank you

Looking for one place to get your data mining information? - Join www.datamikado.com for all your question, information, links, blogs, discussion related to data mining and analytics. Here is the link: http://www.datamikado.com/?xgi=6yt2Usn sandeep

custom data mining algorithm - I have been using 'A Tutorial for Constructing a Managed Plug-In Algorithm' to develop my custom algorithm. I have successfully developed the code needed to train the algorithm but I am little confused on what to do for the prediction part of the..
   Database Help (Home) -> Datamining All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]