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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

internal sql server error

Status
Not open for further replies.

swoodring

Programmer
Dec 7, 2000
114
US
Can some one tell me why I am getting the following error when I run the below query:

Error msg:
Server: Msg 8624, Level 16, State 16, Line 1
Internal SQL Server error.


Query:

SELECT
REPLACE(STR(dbo.Store.StoreNum,3),' ','0') + ' '+dbo.Store.StoreName,
REPLACE(STR(dbo.Store.DistrictCode,2),' ','0' )+' ' + dbo.Store.DistrictName,
sum(dbo.SalesDetailRetail.Quantity),
sum(dbo.SalesDetailRetail.SalePrice)
FROM
dbo.Store,
dbo.SalesDetailRetail
WHERE
( dbo.SalesDetailRetail.StoreNumber=dbo.Store.StoreNum )
AND (
( dbo.SalesDetailRetail.VoidCode = ' '
)
AND ( (dbo.SalesDetailRetail.WeekEndingDate IN(SELECT DISTINCT(dbo.weeks.isodate) FROM dbo.Weeks , dbo.MonthEndingDates JOIN dbo.YearParameters ON dbo.MonthEndingDates.MonthStartDate >= dbo.YearParameters.Start_Date and dbo.MonthEndingDates.MonthEndDate <=dbo.YearParameters.End_Date and
dbo.YearParameters.Year = (SELECT dbo.ReplicationControl.FiscalYear - 1 FROM dbo.ReplicationControl WHERE dbo.ReplicationControl.TableName = 'WEEKHST')
WHERE (dbo.weeks.Isodate >=dbo.MonthEndingDates.MonthStartDate AND dbo.weeks.Isodate <=dbo.MonthEndingDates.MonthEndDate And dbo.MonthEndingDates.MonthNum = 8) )) )
)
GROUP BY
REPLACE(STR(dbo.Store.StoreNum,3),' ','0') + ' '+dbo.Store.StoreName,
REPLACE(STR(dbo.Store.DistrictCode,2),' ','0' )+' ' + dbo.Store.DistrictName

I found something on Microsoft about this error.
FIX: Error 8624 May Occur with Subquery that Contains Aggregate or Computed Columns But according to that its been fixed in SP2 and we are on sp2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top