>Alex,
>
>What SQL Server version are you accessing? Does it have the latest service pack applied?
>
>>
>>I'm trying to do the following SQL query :
>
>>SELECT
>> SCORECARDSID,
>> DATEPART(MONTH, STARTDATE) SDFS ,
>> (SELECT SUM(ACTUALVALUE) FROM PERIODICENTRIES
>> WHERE SCORECARDSID = PE.SCORECARDSID
>> AND DATEPART(MONTH,STARTDATE) = DATEPART(MONTH, PE.STARTDATE)) AS COUNTCOL
>>
>>FROM PERIODICENTRIES PE
>>WHERE
>> SCORECARDSID = 15
>>GROUP BY SCORECARDSID, DATEPART(MONTH, PE.STARTDATE)
>
>>
>>... SQL Server returns the following error
>>Server: Msg 8624, Level 16, State 21, Line 1
>>Internal SQL Server error.
>>
>>
>>What's wrong with my query? The message doesn't say much about what is going on...
I found this on Microsoft web site. You made want to check this out.
http://support.microsoft.com/?kbid=830466FIX: You may receive an "Internal SQL Server error" error message when you run a Transact-SQL SELECT statement on a view that has many subqueries in SQL Server 2000
View products that this article applies to.
Bug #: 470138 (SQL Server 8.0)
Microsoft distributes SQL Server 2000 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2000 fix release.
SYMPTOMS
When you run a Transact-SQL SELECT statement on a view that has many subqueries, you may receive an error message that is similar to the following:
Server: Msg 8624, Level 16, State 21, Line 1
Internal SQL Server error.
Evans
¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°¤º°`°º¤ø¤º°¤º°
Carl Evans
CEO & President
System Answers Consulting, Inc.
MCSD .NET, ASP.NET, C#.NET, VB.NET,