dbTalk Databases Forums  

SQL Server 2000 & SQL Server 2005

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss SQL Server 2000 & SQL Server 2005 in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rogers
 
Posts: n/a

Default SQL Server 2000 & SQL Server 2005 - 05-07-2007 , 11:41 AM






In SQL Server 2000 the following works but in 2005 it gave me an error.

Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting numeric to data type numeric.

Thanks



Reply With Quote
  #2  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: SQL Server 2000 & SQL Server 2005 - 05-07-2007 , 01:41 PM






This is twice now you posted a question but did not include the example. Can
you please post exactly what the commands are you are trying to run when you
get the error?

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote

Quote:
In SQL Server 2000 the following works but in 2005 it gave me an error.

Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting numeric to data type numeric.

Thanks




Reply With Quote
  #3  
Old   
Rogers
 
Posts: n/a

Default Re: SQL Server 2000 & SQL Server 2005 - 05-09-2007 , 08:47 AM



I did but I don't know why commands are not sending...


"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote

Quote:
This is twice now you posted a question but did not include the example.
Can you please post exactly what the commands are you are trying to run
when you get the error?

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:eZFuAaMkHHA.1216 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
In SQL Server 2000 the following works but in 2005 it gave me an error.

Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting numeric to data type numeric.

Thanks






Reply With Quote
  #4  
Old   
Russell Fields
 
Posts: n/a

Default Re: SQL Server 2000 & SQL Server 2005 - 05-10-2007 , 08:09 AM



Nor do I. Try pasting your commands into Notepad first. Then, in Notepad,
select those lines, then cut and paste them into your email message.

RLF
"Rogers" <naissani (AT) hotmail (DOT) com> wrote

Quote:
I did but I don't know why commands are not sending...


"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote in message
news:uw%23cndNkHHA.5048 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
This is twice now you posted a question but did not include the example.
Can you please post exactly what the commands are you are trying to run
when you get the error?

--
Andrew J. Kelly SQL MVP

"Rogers" <naissani (AT) hotmail (DOT) com> wrote in message
news:eZFuAaMkHHA.1216 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
In SQL Server 2000 the following works but in 2005 it gave me an error.

Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting numeric to data type numeric.

Thanks








Reply With Quote
  #5  
Old   
Manon
 
Posts: n/a

Default RE: SQL Server 2000 & SQL Server 2005 - 07-21-2009 , 02:02 AM



The Query I post on my database gave the same error:

SELECT TOP 10000 A.[unid]
FROM [dbo].[hardware] A INNER JOIN (SELECT TOP 1000 B.[recordid] AS [recordid],B.[ranking] AS [ranking]
FROM [dbo].[hardware] C INNER JOIN (SELECT D.[recordid],(SUM( D.[weight]))/(SUM( E.[count])) AS [ranking]
FROM (SELECT F.[recordid],F.[tableid],F.[woordid],((COUNT( F.[woordid])+0.0))/(7) AS [weight],0 AS [ignore],CASE WHEN F.[woordid]=N'5b0001' THEN 1 ELSE 0 END AS [notOr],0 AS [OrGroup0]
FROM [dbo].[woordindex] F WHERE (F.[tableid]=5) AND (F.[woordid] IN(N'5b0001')) GROUP BY F.[recordid],F.[tableid],F.[woordid]) D INNER JOIN [dbo].[recordwoordcount] E ON ((E.[recordid]=D.[recordid]) AND (E.[tableid]=D.[tableid])) AND (ABS(E.[recordstatus])=1) GROUP BY D.[recordid] HAVING SUM( D.[notOr])>=1) B ON C.[unid]=B.[recordid] WHERE (C.[status]=1) OR (C.[status]=-1) ORDER BY ranking DESC) G ON G.[recordid]=A.[unid] WHERE A.[status]=1 ORDER BY A.[naam] ASC

Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting numeric to data type numeric.

Any idea on how to determine which field no longer is correct?


From http://www.google.nl/search?q=Msg+81...&start=10&sa=N

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

Reply With Quote
  #6  
Old   
Uri Dimant
 
Posts: n/a

Default Re: SQL Server 2000 & SQL Server 2005 - 07-21-2009 , 03:40 AM



Manon
Quote:
Any idea on how to determine which field no longer is correct?
It is not easy as I also blocked about such issues
http://dimantdatabasesolutions.blogs...-would-be.html
(Erland had filled Connect about it)


Now , I see the problem might occur here COUNT( F.[woordid])+0.0))/(7) AS
[weight],0 or her SUM( D.[weight]))/(SUM( E.[count])) , so check out what
datatype is so it looks like you want to CAST literal (N'5b0001') to
numeric
Try THEN '1' ELSE '0' END AS [notOr],0 AS [OrGroup0]




"Manon" <manonr (AT) topdesk (DOT) nl> wrote

Quote:
The Query I post on my database gave the same error:

SELECT TOP 10000 A.[unid]
FROM [dbo].[hardware] A INNER JOIN (SELECT TOP 1000 B.[recordid] AS
[recordid],B.[ranking] AS [ranking]
FROM [dbo].[hardware] C INNER JOIN (SELECT D.[recordid],(SUM(
D.[weight]))/(SUM( E.[count])) AS [ranking]
FROM (SELECT F.[recordid],F.[tableid],F.[woordid],((COUNT(
F.[woordid])+0.0))/(7) AS [weight],0 AS [ignore],CASE WHEN
F.[woordid]=N'5b0001' THEN 1 ELSE 0 END AS [notOr],0 AS [OrGroup0]
FROM [dbo].[woordindex] F WHERE (F.[tableid]=5) AND (F.[woordid]
IN(N'5b0001')) GROUP BY F.[recordid],F.[tableid],F.[woordid]) D INNER
JOIN [dbo].[recordwoordcount] E ON ((E.[recordid]=D.[recordid]) AND
(E.[tableid]=D.[tableid])) AND (ABS(E.[recordstatus])=1) GROUP BY
D.[recordid] HAVING SUM( D.[notOr])>=1) B ON C.[unid]=B.[recordid] WHERE
(C.[status]=1) OR (C.[status]=-1) ORDER BY ranking DESC) G ON
G.[recordid]=A.[unid] WHERE A.[status]=1 ORDER BY A.[naam] ASC

Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting numeric to data type numeric.

Any idea on how to determine which field no longer is correct?


From
http://www.google.nl/search?q=Msg+81...&start=10&sa=N

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

Reply With Quote
  #7  
Old   
Erland Sommarskog
 
Posts: n/a

Default RE: SQL Server 2000 & SQL Server 2005 - 07-21-2009 , 05:02 PM



Manon (manonr (AT) topdesk (DOT) nl) writes:
Quote:
The Query I post on my database gave the same error:

SELECT TOP 10000 A.[unid]
FROM [dbo].[hardware] A INNER JOIN (SELECT TOP 1000 B.[recordid] AS
[recordid],B.[ranking] AS [ranking]
FROM [dbo].[hardware] C INNER JOIN (SELECT D.[recordid],(SUM(
D.[weight]))/(SUM( E.[count])) AS [ranking]
FROM (SELECT F.[recordid],F.[tableid],F.[woordid],((COUNT(
F.[woordid])+0.0))/(7) AS [weight],0 AS [ignore],CASE WHEN
F.[woordid]=N'5b0001' THEN 1 ELSE 0 END AS [notOr],0 AS [OrGroup0]
Quote:
FROM [dbo].[woordindex] F WHERE (F.[tableid]=5) AND (F.[woordid]
IN(N'5b0001')) GROUP BY F.[recordid],F.[tableid],F.[woordid]) D INNER JOIN
[dbo].[recordwoordcount] E ON ((E.[recordid]=D.[recordid]) AND
(E.[tableid]=D.[tableid])) AND (ABS(E.[recordstatus])=1) GROUP BY
D.[recordid] HAVING SUM( D.[notOr])>=1) B ON C.[unid]=B.[recordid] WHERE
(C.[status]=1) OR (C.[status]=-1) ORDER BY ranking DESC) G ON
G.[recordid]=A.[unid] WHERE A.[status]=1 ORDER BY A.[naam] ASC
Quote:
Msg 8115, Level 16, State 1, Line 1
Arithmetic overflow error converting numeric to data type numeric.

Any idea on how to determine which field no longer is correct?
Since you have a number of nested derived tabless, you can run the
inner queries, and see on which level the error start to appear.

My bet goes to one of the SUM functions.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.